Commit many java doc fixes.
This commit is contained in:
parent
158b6ff884
commit
1d6ca31b62
|
|
@ -9,5 +9,6 @@ before_install:
|
|||
|
||||
install:
|
||||
- jdk_switcher use oraclejdk8
|
||||
- mvn clean install -Papache-release --quiet jacoco:report coveralls:report
|
||||
- mvn clean install --quiet jacoco:report coveralls:report
|
||||
- mvn javadoc:javadoc
|
||||
|
||||
|
|
|
|||
|
|
@ -21,12 +21,8 @@ package org.apache.skywalking.apm.plugin.jdbc.h2;
|
|||
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceConstructorInterceptor;
|
||||
import org.apache.skywalking.apm.plugin.jdbc.trace.ConnectionInfo;
|
||||
|
||||
/**
|
||||
* {@link PooledJdbcConnectionConstructorInterceptor } store {@link ConnectionInfo}
|
||||
* when the client new instance of {@link org.h2.jdbcx.JdbcXAConnection$PooledJdbcConnection}.
|
||||
*
|
||||
* @author zhangxin
|
||||
*/
|
||||
public class PooledJdbcConnectionConstructorInterceptor implements InstanceConstructorInterceptor {
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ import static net.bytebuddy.matcher.ElementMatchers.takesArguments;
|
|||
|
||||
/**
|
||||
* {@link AbstractConnectionInstrumentation} define how to enhance the following methods that the class which extend
|
||||
* {@link java.sql.Connection}. <br/>
|
||||
* {@link java.sql.Connection}.
|
||||
*
|
||||
* 1. Enhance <code>prepareStatement</code> by <code>org.apache.skywalking.apm.plugin.jdbc.define.JDBCPrepareStatementInterceptor</code>
|
||||
* 3. Enhance <code>prepareCall</code> by <code>org.apache.skywalking.apm.plugin.jdbc.define.JDBCPrepareCallInterceptor</code>
|
||||
|
|
|
|||
|
|
@ -21,9 +21,6 @@ package org.apache.skywalking.apm.plugin.httpClient.v4.define;
|
|||
|
||||
import net.bytebuddy.description.method.MethodDescription;
|
||||
import net.bytebuddy.matcher.ElementMatcher;
|
||||
import org.apache.http.HttpHost;
|
||||
import org.apache.http.HttpRequest;
|
||||
import org.apache.http.protocol.HttpContext;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
|
||||
|
||||
|
|
@ -32,7 +29,7 @@ import static org.apache.skywalking.apm.agent.core.plugin.match.NameMatch.byName
|
|||
|
||||
/**
|
||||
* {@link AbstractHttpClientInstrumentation} presents that skywalking intercepts
|
||||
* {@link org.apache.http.impl.client.AbstractHttpClient#doExecute(HttpHost, HttpRequest, HttpContext)}
|
||||
* AbstractHttpClient#doExecute
|
||||
* by using {@link HttpClientInstrumentation#INTERCEPT_CLASS}.
|
||||
*
|
||||
* @author zhangxin
|
||||
|
|
@ -47,9 +44,8 @@ public class AbstractHttpClientInstrumentation extends HttpClientInstrumentation
|
|||
}
|
||||
|
||||
/**
|
||||
* version 4.2, intercept method: execute, intercept<br/>
|
||||
* public final HttpResponse execute(HttpHost target, HttpRequest request,
|
||||
* HttpContext context)<br/>
|
||||
* version 4.2, intercept method: execute, intercept
|
||||
* public final HttpResponse execute(HttpHost target, HttpRequest request, HttpContext context)
|
||||
*/
|
||||
@Override
|
||||
protected InstanceMethodsInterceptPoint[] getInstanceMethodsInterceptPoints() {
|
||||
|
|
|
|||
|
|
@ -16,14 +16,13 @@
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
package org.apache.skywalking.apm.plugin.httpClient.v4.define;
|
||||
|
||||
import net.bytebuddy.description.method.MethodDescription;
|
||||
import net.bytebuddy.matcher.ElementMatcher;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.match.NameMatch;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.match.NameMatch;
|
||||
|
||||
import static net.bytebuddy.matcher.ElementMatchers.named;
|
||||
|
||||
|
|
@ -35,8 +34,8 @@ public class DefaultRequestDirectorInstrumentation extends HttpClientInstrumenta
|
|||
private static final String ENHANCE_CLASS = "org.apache.http.impl.client.DefaultRequestDirector";
|
||||
|
||||
/**
|
||||
* DefaultRequestDirector is default implement.<br/>
|
||||
* usually use in version 4.0-4.2<br/>
|
||||
* DefaultRequestDirector is default implement.
|
||||
* usually use in version 4.0-4.2
|
||||
* since 4.3, this class is Deprecated.
|
||||
*/
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -28,9 +28,9 @@ import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
|
|||
import static net.bytebuddy.matcher.ElementMatchers.named;
|
||||
|
||||
/**
|
||||
* {@link AbstractHttpClientInstrumentation} presents that skywalking intercepts {@link
|
||||
* org.apache.http.impl.client.InternalHttpClient#doExecute(org.apache.http.HttpHost, org.apache.http.HttpRequest,
|
||||
* org.apache.http.protocol.HttpContext)} by using {@link HttpClientInstrumentation#INTERCEPT_CLASS}.
|
||||
* {@link AbstractHttpClientInstrumentation} presents that skywalking intercepts
|
||||
* InternalHttpClient#doExecute
|
||||
* by using {@link HttpClientInstrumentation#INTERCEPT_CLASS}.
|
||||
*
|
||||
* @author zhangxin
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -21,9 +21,6 @@ package org.apache.skywalking.apm.plugin.httpClient.v4.define;
|
|||
|
||||
import net.bytebuddy.description.method.MethodDescription;
|
||||
import net.bytebuddy.matcher.ElementMatcher;
|
||||
import org.apache.http.HttpHost;
|
||||
import org.apache.http.HttpRequest;
|
||||
import org.apache.http.protocol.HttpContext;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.match.NameMatch;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
|
||||
|
|
@ -32,7 +29,7 @@ import static net.bytebuddy.matcher.ElementMatchers.named;
|
|||
|
||||
/**
|
||||
* {@link AbstractHttpClientInstrumentation} presents that skywalking
|
||||
* intercepts {@link org.apache.http.impl.client.MinimalHttpClient#doExecute(HttpHost, HttpRequest, HttpContext)}
|
||||
* intercepts MinimalHttpClient#doExecute
|
||||
* by using {@link HttpClientInstrumentation#INTERCEPT_CLASS}.
|
||||
*
|
||||
* @author zhangxin
|
||||
|
|
|
|||
|
|
@ -24,16 +24,10 @@ import org.apache.skywalking.apm.plugin.jdbc.trace.ConnectionInfo;
|
|||
|
||||
/**
|
||||
* {@link H2URLParser} presents that skywalking how to parse the connection url of H2 database.
|
||||
* {@link ConnectionInfo#host} will return localhost and {@link ConnectionInfo#port} will return
|
||||
* -1 if H2 running with memory mode or file mode, or it will return the host and the port.
|
||||
* <p>
|
||||
*
|
||||
* {@link H2URLParser} check the connection url if contains "file" or "mem". if yes. the database
|
||||
* name substring the connection url from the index after "file" index or the "mem" index to the
|
||||
* index of first charset ";".
|
||||
* <p>
|
||||
* The {@link ConnectionInfo#host} be set the string between charset "//" and the first charset "/" after
|
||||
* the charset "//", and {@link ConnectionInfo#databaseName} be set the string between the last index of "/" and
|
||||
* the first charset ";".
|
||||
*
|
||||
* @author zhangxin
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -24,11 +24,6 @@ import org.apache.skywalking.apm.plugin.jdbc.trace.ConnectionInfo;
|
|||
|
||||
/**
|
||||
* {@link MysqlURLParser} parse connection url of mysql.
|
||||
* <p>
|
||||
* The {@link ConnectionInfo#host} be set the string between charset "//" and the first
|
||||
* charset "/" after the charset "//", and {@link ConnectionInfo#databaseName} be set the
|
||||
* string between the last index of "/" and the first charset "?". but one more thing, the
|
||||
* {@link ConnectionInfo#hosts} be set if the host container multiple host.
|
||||
*
|
||||
* @author zhangxin
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -27,13 +27,9 @@ import org.apache.skywalking.apm.util.StringUtil;
|
|||
|
||||
/**
|
||||
* {@link OracleURLParser} presents that how to parse oracle connection url.
|
||||
* <p>
|
||||
* The {@link ConnectionInfo#host} be set the string between charset "@" and the last
|
||||
* charset ":" after the charset "@", and {@link ConnectionInfo#databaseName} be set the
|
||||
* string that after the last index of ":".
|
||||
* <p>
|
||||
*
|
||||
* Note: {@link OracleURLParser} can parse the commons connection url. the commons
|
||||
* connection url is of the form: <code>jdbc:oracle:<drivertype>:@<database></code>,the other
|
||||
* connection url is of the form: <code>jdbc:oracle:(drivertype):@(database)</code>,the other
|
||||
* the form of connection url cannot be parsed success.
|
||||
*
|
||||
* @author zhangxin
|
||||
|
|
|
|||
|
|
@ -24,11 +24,6 @@ import org.apache.skywalking.apm.plugin.jdbc.trace.ConnectionInfo;
|
|||
|
||||
/**
|
||||
* {@link PostgreSQLURLParser} parse connection url of mysql.
|
||||
* <p>
|
||||
* The {@link ConnectionInfo#host} be set the string between charset "//" and the first
|
||||
* charset "/" after the charset "//", and {@link ConnectionInfo#databaseName} be set the
|
||||
* string between the last index of "/" and the first charset "?". but one more thing, the
|
||||
* {@link ConnectionInfo#hosts} be set if the host container multiple host.
|
||||
*
|
||||
* @author zhangxin
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ import org.apache.skywalking.apm.network.trace.component.OfficialComponent;
|
|||
|
||||
/**
|
||||
* {@link ConnectionInfo} stored the jdbc connection info, the connection info contains db type, host, port, database
|
||||
* name. The {@link #hosts} be null if {@link #host} is not null.
|
||||
* name.
|
||||
*
|
||||
* @author zhangxin
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -38,8 +38,8 @@ import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInt
|
|||
import org.apache.skywalking.apm.network.trace.component.ComponentsDefine;
|
||||
|
||||
/**
|
||||
* {@link MongoDBCollectionMethodInterceptor} intercepts constructor of {@link com.mongodb.DBCollection}or {@link
|
||||
* com.mongodb.DBCollectionImpl} recording the ServerAddress and creating the exit span.
|
||||
* {@link MongoDBCollectionMethodInterceptor} intercepts constructor of {@link com.mongodb.DBCollection} or
|
||||
* {@link com.mongodb.DBCollectionImpl} recording the ServerAddress and creating the exit span.
|
||||
*
|
||||
* @author liyuntao
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ package org.apache.skywalking.apm.plugin.mongodb.v2.define;
|
|||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
|
||||
|
||||
/**
|
||||
* @auther liyuntao
|
||||
* @author liyuntao
|
||||
*/
|
||||
public abstract class InterceptPoint implements InstanceMethodsInterceptPoint {
|
||||
private static final String MONGDB_METHOD_INTERCET_CLASS = "MongoDBCollectionMethodInterceptor";
|
||||
|
|
|
|||
|
|
@ -33,14 +33,14 @@ import static net.bytebuddy.matcher.ElementMatchers.takesArguments;
|
|||
|
||||
/**
|
||||
* {@link MongoDBCollectionImplInstrumentation} define that the MongoDB Java Driver 2.13.x-2.14.x plugin intercepts the
|
||||
* following methods in the {@link com.mongodb.DBCollectionImpl}class:
|
||||
* 1. find <br/>
|
||||
* 2. insert <br/>
|
||||
* 3. insertImpl <br/>
|
||||
* 4. update <br/>
|
||||
* 5. updateImpl <br/>
|
||||
* 6. remove <br/>
|
||||
* 7. createIndex <br/>
|
||||
* following methods in the com.mongodb.DBCollectionImpl class:
|
||||
* 1. find
|
||||
* 2. insert
|
||||
* 3. insertImpl
|
||||
* 4. update
|
||||
* 5. updateImpl
|
||||
* 6. remove
|
||||
* 7. createIndex
|
||||
*
|
||||
* @author liyuntao
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -16,14 +16,13 @@
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
package org.apache.skywalking.apm.plugin.mongodb.v2.define;
|
||||
|
||||
import net.bytebuddy.description.method.MethodDescription;
|
||||
import net.bytebuddy.matcher.ElementMatcher;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
|
||||
|
||||
import static net.bytebuddy.matcher.ElementMatchers.any;
|
||||
|
|
@ -35,16 +34,16 @@ import static org.apache.skywalking.apm.agent.core.plugin.match.NameMatch.byName
|
|||
/**
|
||||
* {@link MongoDBCollectionInstrumentation} define that the MongoDB Java Driver 2.13.x-2.14.x plugin intercepts the
|
||||
* following methods in the {@link com.mongodb.DBCollection}class:
|
||||
* 1. aggregate <br/>
|
||||
* 2. findAndModify <br/>
|
||||
* 1. aggregate
|
||||
* 2. findAndModify
|
||||
* 3. getCount
|
||||
* <br/>
|
||||
* 4. drop <br/>
|
||||
* 5. dropIndexes <br/>
|
||||
* 6. rename <br/>
|
||||
* 7. group <br/>
|
||||
* 8. distinct <br/>
|
||||
* 9. mapReduce <br/>
|
||||
*
|
||||
* 4. drop
|
||||
* 5. dropIndexes
|
||||
* 6. rename
|
||||
* 7. group
|
||||
* 8. distinct
|
||||
* 9. mapReduce
|
||||
*
|
||||
* @author liyuntao
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -27,9 +27,6 @@ import org.apache.skywalking.apm.plugin.jdbc.define.StatementEnhanceInfos;
|
|||
import org.apache.skywalking.apm.plugin.jdbc.trace.ConnectionInfo;
|
||||
|
||||
/**
|
||||
* {@link CreateStatementInterceptor} intercepts the {@link com.mysql.jdbc.ConnectionImpl#createStatement()} method in
|
||||
* the {@link com.mysql.jdbc.ConnectionImpl} class.
|
||||
*
|
||||
* @author zhangxin
|
||||
*/
|
||||
public class CreateCallableStatementInterceptor implements InstanceMethodsAroundInterceptor {
|
||||
|
|
|
|||
|
|
@ -16,20 +16,16 @@
|
|||
*
|
||||
*/
|
||||
|
||||
|
||||
package org.apache.skywalking.apm.plugin.jdbc.mysql;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance;
|
||||
import org.apache.skywalking.apm.plugin.jdbc.define.StatementEnhanceInfos;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInterceptResult;
|
||||
import org.apache.skywalking.apm.plugin.jdbc.define.StatementEnhanceInfos;
|
||||
import org.apache.skywalking.apm.plugin.jdbc.trace.ConnectionInfo;
|
||||
|
||||
/**
|
||||
* {@link CreateStatementInterceptor} intercepts the {@link com.mysql.jdbc.ConnectionImpl#prepareStatement()} method in
|
||||
* the {@link com.mysql.jdbc.ConnectionImpl} class.
|
||||
*
|
||||
* @author zhangxin
|
||||
*/
|
||||
public class CreatePreparedStatementInterceptor implements InstanceMethodsAroundInterceptor {
|
||||
|
|
|
|||
|
|
@ -27,9 +27,6 @@ import org.apache.skywalking.apm.plugin.jdbc.define.StatementEnhanceInfos;
|
|||
import org.apache.skywalking.apm.plugin.jdbc.trace.ConnectionInfo;
|
||||
|
||||
/**
|
||||
* {@link CreateStatementInterceptor} intercepts the {@link com.mysql.jdbc.ConnectionImpl#createStatement()} method in
|
||||
* the {@link com.mysql.jdbc.ConnectionImpl} class.
|
||||
*
|
||||
* @author zhangxin
|
||||
*/
|
||||
public class CreateStatementInterceptor implements InstanceMethodsAroundInterceptor {
|
||||
|
|
|
|||
|
|
@ -30,11 +30,11 @@ import static net.bytebuddy.matcher.ElementMatchers.named;
|
|||
import static org.apache.skywalking.apm.agent.core.plugin.match.MultiClassNameMatch.byMultiClassMatch;
|
||||
|
||||
/**
|
||||
* {@link CallableInstrumentation} define that the mysql-2.x plugin intercepts the following methods in the {@link
|
||||
* com.mysql.jdbc.CallableStatement} by {@link org.apache.skywalking.apm.plugin.jdbc.mysql.CallableStatementInterceptor}:
|
||||
* 1. execute <br/>
|
||||
* 2. executeQuery <br/>
|
||||
* 3. executeUpdate <br/>
|
||||
* {@link CallableInstrumentation} define that the mysql-2.x plugin intercepts the following methods in the
|
||||
* com.mysql.jdbc.CallableStatement
|
||||
* 1. execute
|
||||
* 2. executeQuery
|
||||
* 3. executeUpdate
|
||||
*
|
||||
* @author zhangxin
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@ import static net.bytebuddy.matcher.ElementMatchers.named;
|
|||
import static net.bytebuddy.matcher.ElementMatchers.takesArguments;
|
||||
|
||||
/**
|
||||
* {@link ConnectionInstrumentation} intercepts the following methods that the class which extend {@link
|
||||
* com.mysql.jdbc.ConnectionImpl}. <br/>
|
||||
* {@link ConnectionInstrumentation} intercepts the following methods that the class which extend
|
||||
* com.mysql.jdbc.ConnectionImpl.
|
||||
*
|
||||
* 1. Enhance <code>prepareStatement</code> by <code>org.apache.skywalking.apm.plugin.jdbc.define.JDBCPrepareStatementInterceptor</code>
|
||||
* 2. Enhance <code>prepareCall</code> by <code>org.apache.skywalking.apm.plugin.jdbc.define.JDBCPrepareCallInterceptor</code>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
|
|||
import static org.apache.skywalking.apm.agent.core.plugin.match.NameMatch.byName;
|
||||
|
||||
/**
|
||||
* {@link Mysql50ConnectionInstrumentation} interceptor the {@link com.mysql.jdbc.Connection} class in the 5.0.x verison
|
||||
* {@link Mysql50ConnectionInstrumentation} interceptor the com.mysql.jdbc.Connection class in the 5.0.x verison
|
||||
* of mysql driver jar.
|
||||
*
|
||||
* @author zhangxin
|
||||
|
|
|
|||
|
|
@ -31,13 +31,13 @@ import static org.apache.skywalking.apm.agent.core.plugin.match.MultiClassNameMa
|
|||
|
||||
/**
|
||||
* {@link PreparedStatementInstrumentation} define that the mysql-2.x plugin intercepts the following methods in the
|
||||
* {@link com.mysql.jdbc.JDBC42PreparedStatement}, {@link com.mysql.jdbc.PreparedStatement} and {@link
|
||||
* com.mysql.cj.jdbc.PreparedStatement} class:
|
||||
* 1. execute <br/>
|
||||
* 2. executeQuery <br/>
|
||||
* 3. executeUpdate <br/>
|
||||
* 4. executeLargeUpdate <br/>
|
||||
* 5. addBatch <br/>
|
||||
* com.mysql.jdbc.JDBC42PreparedStatement, com.mysql.jdbc.PreparedStatement and
|
||||
* com.mysql.cj.jdbc.PreparedStatement class:
|
||||
* 1. execute
|
||||
* 2. executeQuery
|
||||
* 3. executeUpdate
|
||||
* 4. executeLargeUpdate
|
||||
* 5. addBatch
|
||||
*
|
||||
* @author zhangxin
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -30,17 +30,17 @@ import static net.bytebuddy.matcher.ElementMatchers.named;
|
|||
import static org.apache.skywalking.apm.agent.core.plugin.match.MultiClassNameMatch.byMultiClassMatch;
|
||||
|
||||
/**
|
||||
* {@link StatementInstrumentation} intercepts the following methods in the {@link
|
||||
* com.mysql.jdbc.StatementImpl} and {@link com.mysql.cj.jdbc.StatementImpl}class.
|
||||
* 1. execute <br/>
|
||||
* 2. executeQuery <br/>
|
||||
* 3. executeUpdate <br/>
|
||||
* 4. executeLargeUpdate <br/>
|
||||
* 5. addBatch <br/>
|
||||
* 6. executeBatchInternal <br/>
|
||||
* 7. executeUpdateInternal <br/>
|
||||
* 8. executeQuery <br/>
|
||||
* 9. executeBatch <br/>
|
||||
* {@link StatementInstrumentation} intercepts the following methods in the
|
||||
* com.mysql.jdbc.StatementImpl and com.mysql.cj.jdbc.StatementImpl class.
|
||||
* 1. execute
|
||||
* 2. executeQuery
|
||||
* 3. executeUpdate
|
||||
* 4. executeLargeUpdate
|
||||
* 5. addBatch
|
||||
* 6. executeBatchInternal
|
||||
* 7. executeUpdateInternal
|
||||
* 8. executeQuery
|
||||
* 9. executeBatch
|
||||
*
|
||||
* @author zhangxin
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -24,13 +24,12 @@ import java.lang.reflect.Method;
|
|||
import java.lang.reflect.Modifier;
|
||||
import okhttp3.Headers;
|
||||
import okhttp3.HttpUrl;
|
||||
import okhttp3.OkHttpClient;
|
||||
import okhttp3.Request;
|
||||
import okhttp3.Response;
|
||||
import org.apache.skywalking.apm.agent.core.context.ContextCarrier;
|
||||
import org.apache.skywalking.apm.agent.core.context.tag.Tags;
|
||||
import org.apache.skywalking.apm.agent.core.context.CarrierItem;
|
||||
import org.apache.skywalking.apm.agent.core.context.ContextCarrier;
|
||||
import org.apache.skywalking.apm.agent.core.context.ContextManager;
|
||||
import org.apache.skywalking.apm.agent.core.context.tag.Tags;
|
||||
import org.apache.skywalking.apm.agent.core.context.trace.AbstractSpan;
|
||||
import org.apache.skywalking.apm.agent.core.context.trace.SpanLayer;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance;
|
||||
|
|
@ -46,13 +45,6 @@ import org.apache.skywalking.apm.network.trace.component.ComponentsDefine;
|
|||
*/
|
||||
public class RealCallInterceptor implements InstanceMethodsAroundInterceptor, InstanceConstructorInterceptor {
|
||||
|
||||
/**
|
||||
* Intercept the {@link okhttp3.RealCall#RealCall(OkHttpClient, Request, boolean)}, then put the second argument of
|
||||
* {@link okhttp3.Request} into {@link EnhancedInstance}.
|
||||
*
|
||||
* @param objInst a new added instance field
|
||||
* @param allArguments constructor invocation context.
|
||||
*/
|
||||
@Override
|
||||
public void onConstruct(EnhancedInstance objInst, Object[] allArguments) {
|
||||
objInst.setSkyWalkingDynamicField(allArguments[1]);
|
||||
|
|
|
|||
|
|
@ -25,16 +25,12 @@ import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsIn
|
|||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.match.NameMatch;
|
||||
import org.apache.skywalking.apm.plugin.okhttp.v3.RealCallInterceptor;
|
||||
|
||||
import static net.bytebuddy.matcher.ElementMatchers.any;
|
||||
import static net.bytebuddy.matcher.ElementMatchers.named;
|
||||
import static net.bytebuddy.matcher.ElementMatchers.takesArguments;
|
||||
|
||||
/**
|
||||
* {@link RealCallInstrumentation} presents that skywalking intercepts {@link okhttp3.RealCall#RealCall(OkHttpClient,
|
||||
* Request, boolean)}, {@link okhttp3.RealCall#execute()} by using {@link RealCallInterceptor}.
|
||||
*
|
||||
* @author peng-yongsheng
|
||||
*/
|
||||
public class RealCallInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
|
||||
|
|
|
|||
|
|
@ -21,15 +21,12 @@ package org.apache.skywalking.apm.plugin.jdbc.postgresql;
|
|||
|
||||
import java.lang.reflect.Method;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance;
|
||||
import org.apache.skywalking.apm.plugin.jdbc.define.StatementEnhanceInfos;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInterceptResult;
|
||||
import org.apache.skywalking.apm.plugin.jdbc.define.StatementEnhanceInfos;
|
||||
import org.apache.skywalking.apm.plugin.jdbc.trace.ConnectionInfo;
|
||||
|
||||
/**
|
||||
* {@link CreateStatementInterceptor} intercepts the {@link org.postgresql.jdbc.PgConnection#prepareCall} method in
|
||||
* {@link org.postgresql.jdbc.PgConnection}, {@link org.postgresql.jdbc.PgConnection} or {@link org.postgresql.jdbc3.Jdbc3Connection} class.
|
||||
*
|
||||
* @author zhangxin
|
||||
*/
|
||||
public class CreateCallableStatementInterceptor implements InstanceMethodsAroundInterceptor {
|
||||
|
|
|
|||
|
|
@ -21,15 +21,12 @@ package org.apache.skywalking.apm.plugin.jdbc.postgresql;
|
|||
|
||||
import java.lang.reflect.Method;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance;
|
||||
import org.apache.skywalking.apm.plugin.jdbc.define.StatementEnhanceInfos;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceMethodsAroundInterceptor;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInterceptResult;
|
||||
import org.apache.skywalking.apm.plugin.jdbc.define.StatementEnhanceInfos;
|
||||
import org.apache.skywalking.apm.plugin.jdbc.trace.ConnectionInfo;
|
||||
|
||||
/**
|
||||
* {@link CreatePreparedStatementInterceptor} intercepts the {@link org.postgresql.jdbc.PgConnection#prepareStatement} method in
|
||||
* {@link org.postgresql.jdbc.PgConnection}, {@link org.postgresql.jdbc.PgConnection} or {@link org.postgresql.jdbc3.Jdbc3Connection} class.
|
||||
*
|
||||
* @author zhangxin
|
||||
*/
|
||||
public class CreatePreparedStatementInterceptor implements InstanceMethodsAroundInterceptor {
|
||||
|
|
|
|||
|
|
@ -25,12 +25,8 @@ import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceM
|
|||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInterceptResult;
|
||||
import org.apache.skywalking.apm.plugin.jdbc.define.StatementEnhanceInfos;
|
||||
import org.apache.skywalking.apm.plugin.jdbc.trace.ConnectionInfo;
|
||||
import org.postgresql.jdbc.PgConnection;
|
||||
|
||||
/**
|
||||
* {@link CreateStatementInterceptor} intercepts the {@link PgConnection#createStatement} method in
|
||||
* {@link org.postgresql.jdbc.PgConnection}, {@link org.postgresql.jdbc.PgConnection} or {@link org.postgresql.jdbc3.Jdbc3Connection} class.
|
||||
*
|
||||
* @author zhangxin
|
||||
*/
|
||||
public class CreateStatementInterceptor implements InstanceMethodsAroundInterceptor {
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ package org.apache.skywalking.apm.plugin.jdbc.postgresql.define;
|
|||
|
||||
import net.bytebuddy.description.method.MethodDescription;
|
||||
import net.bytebuddy.matcher.ElementMatcher;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
|
||||
import org.apache.skywalking.apm.plugin.jdbc.postgresql.StatementExecuteMethodsInterceptor;
|
||||
|
||||
|
|
@ -34,8 +34,8 @@ import static org.apache.skywalking.apm.plugin.jdbc.postgresql.Variables.PG_PREP
|
|||
import static org.apache.skywalking.apm.plugin.jdbc.postgresql.Variables.PG_STATEMENT_EXECUTE_METHOD_INTERCEPTOR;
|
||||
|
||||
/**
|
||||
* {@link AbstractJdbc2StatementInstrumentation} intercept the following methods that the class which extend {@link
|
||||
* org.postgresql.jdbc2.AbstractJdbc2Statement} by {@link StatementExecuteMethodsInterceptor}. <br/>
|
||||
* {@link AbstractJdbc2StatementInstrumentation} intercept the following methods that the class which extend
|
||||
* org.postgresql.jdbc2.AbstractJdbc2Statement by {@link StatementExecuteMethodsInterceptor}.
|
||||
* 1. the <code>execute</code> with non parameter
|
||||
* 2. the <code>execute</code> with one parameter
|
||||
* 3. the <code>executeBatch</code>
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ package org.apache.skywalking.apm.plugin.jdbc.postgresql.define;
|
|||
|
||||
import net.bytebuddy.description.method.MethodDescription;
|
||||
import net.bytebuddy.matcher.ElementMatcher;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
|
||||
|
||||
import static net.bytebuddy.matcher.ElementMatchers.named;
|
||||
|
|
@ -32,8 +32,8 @@ import static org.apache.skywalking.apm.agent.core.plugin.bytebuddy.ArgumentType
|
|||
import static org.apache.skywalking.apm.agent.core.plugin.match.MultiClassNameMatch.byMultiClassMatch;
|
||||
|
||||
/**
|
||||
* {@link ConnectionInstrumentation} intercept the following methods that the class which extend {@link
|
||||
* org.postgresql.jdbc.PgConnection}. <br/>
|
||||
* {@link ConnectionInstrumentation} intercept the following methods that the class which extend
|
||||
* {@link org.postgresql.jdbc.PgConnection}.
|
||||
*
|
||||
* 1. Enhance <code>prepareStatement</code> by <code>org.apache.skywalking.apm.plugin.jdbc.define.JDBCPrepareStatementInterceptor</code>
|
||||
* 2. Enhance <code>prepareStatement</code> that the seconds argument type is <code>java.lang.String[]</code> by
|
||||
|
|
|
|||
|
|
@ -21,18 +21,18 @@ package org.apache.skywalking.apm.plugin.jdbc.postgresql.define;
|
|||
|
||||
import net.bytebuddy.description.method.MethodDescription;
|
||||
import net.bytebuddy.matcher.ElementMatcher;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.match.NameMatch;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.match.NameMatch;
|
||||
|
||||
import static net.bytebuddy.matcher.ElementMatchers.named;
|
||||
import static net.bytebuddy.matcher.ElementMatchers.takesArguments;
|
||||
|
||||
/**
|
||||
* {@link Jdbc3ConnectionInstrumentation} intercept the following methods that the class which extend {@link
|
||||
* org.postgresql.jdbc3.Jdbc3Connection}. <br/>
|
||||
* {@link Jdbc3ConnectionInstrumentation} intercept the following methods that the class which extend
|
||||
* org.postgresql.jdbc3.Jdbc3Connection
|
||||
*
|
||||
* 1. Enhance <code>prepareStatement</code> by <code>org.apache.skywalking.apm.plugin.jdbc.define.JDBCPrepareStatementInterceptor</code>
|
||||
* 2. Enhance <code>prepareCall</code> by
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ package org.apache.skywalking.apm.plugin.jdbc.postgresql.define;
|
|||
|
||||
import net.bytebuddy.description.method.MethodDescription;
|
||||
import net.bytebuddy.matcher.ElementMatcher;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.InstanceMethodsInterceptPoint;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.ClassInstanceMethodsEnhancePluginDefine;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.ConstructorInterceptPoint;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.match.ClassMatch;
|
||||
|
||||
import static net.bytebuddy.matcher.ElementMatchers.named;
|
||||
|
|
@ -31,8 +31,8 @@ import static net.bytebuddy.matcher.ElementMatchers.takesArguments;
|
|||
import static org.apache.skywalking.apm.agent.core.plugin.match.NameMatch.byName;
|
||||
|
||||
/**
|
||||
* {@link Jdbc4ConnectionInstrumentation} intercept the following methods that the class which extend {@link
|
||||
* org.postgresql.jdbc4.Jdbc4Connection}. <br/>
|
||||
* {@link Jdbc4ConnectionInstrumentation} intercept the following methods that the class which extend
|
||||
* org.postgresql.jdbc4.Jdbc4Connection.
|
||||
*
|
||||
* 1. Enhance <code>prepareStatement</code> by <code>org.apache.skywalking.apm.plugin.jdbc.define.JDBCPrepareStatementInterceptor</code>
|
||||
* 2. Enhance <code>prepareCall</code> by
|
||||
|
|
|
|||
|
|
@ -19,13 +19,13 @@
|
|||
|
||||
package org.apache.skywalking.apm.plugin.sjdbc.define;
|
||||
|
||||
import com.dangdang.ddframe.rdb.sharding.executor.ExecutorEngine;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedInstance;
|
||||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceConstructorInterceptor;
|
||||
import org.apache.skywalking.apm.plugin.sjdbc.ExecuteEventListener;
|
||||
|
||||
/**
|
||||
* {@link ExecutorEngineConstructorInterceptor} enhances {@link ExecutorEngine#}'s constructor, initializing {@link ExecuteEventListener}
|
||||
* {@link ExecutorEngineConstructorInterceptor} enhances {@link com.dangdang.ddframe.rdb.sharding.executor.ExecutorEngine}'s constructor,
|
||||
* initializing {@link ExecuteEventListener}
|
||||
*
|
||||
* @author gaohongtao
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.MethodInt
|
|||
import org.springframework.aop.framework.AdvisedSupport;
|
||||
|
||||
/**
|
||||
* <code>CreateAopProxyInterceptor</code> check that the bean has been implement {@link EnhancedInstance}. <p/>
|
||||
* <code>CreateAopProxyInterceptor</code> check that the bean has been implement {@link EnhancedInstance}.
|
||||
* if yes, true will be returned.
|
||||
*
|
||||
* @author zhang xin
|
||||
|
|
|
|||
|
|
@ -30,11 +30,6 @@ import static net.bytebuddy.matcher.ElementMatchers.named;
|
|||
import static org.apache.skywalking.apm.agent.core.plugin.match.NameMatch.byName;
|
||||
|
||||
/**
|
||||
* {@link TomcatInstrumentation} presents that skywalking using class {@link org.apache.skywalking.apm.plugin.tomcat78x.TomcatInvokeInterceptor} to intercept
|
||||
* {@link org.apache.catalina.core.StandardWrapperValve#invoke} and using class {@link
|
||||
* org.apache.skywalking.apm.plugin.tomcat78x.TomcatExceptionInterceptor} to intercept {@link
|
||||
* org.apache.catalina.core.StandardWrapperValve#exception}.
|
||||
*
|
||||
* @author zhangxin
|
||||
*/
|
||||
public class TomcatInstrumentation extends ClassInstanceMethodsEnhancePluginDefine {
|
||||
|
|
|
|||
|
|
@ -27,17 +27,6 @@ import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedI
|
|||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceConstructorInterceptor;
|
||||
|
||||
/**
|
||||
* {@link XMemcachedConstructorWithComplexArgInterceptor} intercept constructor of
|
||||
* {@link XMemcachedClient(MemcachedSessionLocator locator,BufferAllocator allocator, Configuration conf,
|
||||
* Map<SocketOption, Object> socketOptions, CommandFactory commandFactory, Transcoder transcoder,
|
||||
* Map<InetSocketAddress, InetSocketAddress> addressMap, List<MemcachedClientStateListener> stateListeners,
|
||||
* Map<InetSocketAddress, AuthInfo> map, int poolSize, long connectTimeout, String name, boolean failureMode)} or
|
||||
* {@link XMemcachedClient(MemcachedSessionLocator locator, BufferAllocator allocator, Configuration conf,
|
||||
* Map<SocketOption, Object> socketOptions, CommandFactory commandFactory, Transcoder transcoder,
|
||||
* Map<InetSocketAddress, InetSocketAddress> addressMap, int[] weights, List<MemcachedClientStateListener> stateListeners,
|
||||
* Map<InetSocketAddress, AuthInfo> infoMap, int poolSize, long connectTimeout, final String name, boolean failureMode)}.
|
||||
* For parameter addressMap, every k-v is a master standby mode.
|
||||
*
|
||||
* @author IluckySi
|
||||
*/
|
||||
public class XMemcachedConstructorWithComplexArgInterceptor implements InstanceConstructorInterceptor {
|
||||
|
|
|
|||
|
|
@ -23,10 +23,6 @@ import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedI
|
|||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceConstructorInterceptor;
|
||||
|
||||
/**
|
||||
* {@link XMemcachedConstructorWithHostPortArgInterceptor} intercept constructor of
|
||||
* {@link XMemcachedClient(final String host, final int port)} or
|
||||
* {@link XMemcachedClient(final String host, final int port, int weight)}.
|
||||
*
|
||||
* @author IluckySi
|
||||
*/
|
||||
public class XMemcachedConstructorWithHostPortArgInterceptor implements InstanceConstructorInterceptor {
|
||||
|
|
|
|||
|
|
@ -25,10 +25,6 @@ import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedI
|
|||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceConstructorInterceptor;
|
||||
|
||||
/**
|
||||
* {@link XMemcachedConstructorWithInetSocketAddressArgInterceptor} intercept constructor of
|
||||
* {@link XMemcachedClient(final InetSocketAddress inetSocketAddress)} or
|
||||
* {@link XMemcachedClient(final InetSocketAddress inetSocketAddress, int weight)}.
|
||||
*
|
||||
* @author IluckySi
|
||||
*/
|
||||
public class XMemcachedConstructorWithInetSocketAddressArgInterceptor implements InstanceConstructorInterceptor {
|
||||
|
|
|
|||
|
|
@ -26,9 +26,6 @@ import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.EnhancedI
|
|||
import org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstanceConstructorInterceptor;
|
||||
|
||||
/**
|
||||
* {@link XMemcachedConstructorWithInetSocketAddressListArgInterceptor} intercept constructor of
|
||||
* {@link XMemcachedClient(List<InetSocketAddress> addressList).
|
||||
*
|
||||
* @author IluckySi
|
||||
*/
|
||||
public class XMemcachedConstructorWithInetSocketAddressListArgInterceptor implements InstanceConstructorInterceptor {
|
||||
|
|
|
|||
|
|
@ -36,15 +36,8 @@ import static net.bytebuddy.matcher.ElementMatchers.takesArgument;
|
|||
import static net.bytebuddy.matcher.ElementMatchers.takesArguments;
|
||||
|
||||
/**
|
||||
* {@link MemcachedInstrumentation} presents that skywalking intercept all constructors and methods of
|
||||
* {@link XMemcachedInstrumentation} presents that skywalking intercept all constructors and methods of
|
||||
* {@link net.rubyeye.xmemcached.XMemcachedClient}.
|
||||
* {@link XMemcachedConstructorWithHostPortArgInterceptor} intercepts the constructor with
|
||||
* ip and port arguments.
|
||||
* {@link XMemcachedConstructorWithInetSocketAddressArgInterceptor} intercepts the constructor with
|
||||
* argument {@link java.net.InetSocketAddress}.
|
||||
* {@link XMemcachedConstructorWithInetSocketAddressListArgInterceptor} intercepts the constructor with
|
||||
* argument {@link java.net.InetSocketAddress}.
|
||||
* {@link XMemcachedConstructorWithComplexArgInterceptor} intercepts the constructor with complex arguments.
|
||||
*
|
||||
* @author IluckySi
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in New Issue