Add witness classes to graphql and vertx-core-3.x plugins (#113)

This commit is contained in:
Brandon Fergerson 2022-03-01 03:55:11 +01:00 committed by GitHub
parent 74b130c827
commit bf126a6afb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
22 changed files with 103 additions and 6 deletions

View File

@ -13,6 +13,8 @@ Release Notes.
* Support HikariCP Connection pool metrics collecting.
* Support Dbcp2 Connection pool metrics collecting.
* Ignore the synthetic constructor created by the agent in the Spring patch plugin.
* Add witness class for vertx-core-3.x plugin.
* Add witness class for graphql plugin.
#### Documentation
* Add link about java agent injector.

View File

@ -64,6 +64,9 @@ public class GraphqlInstrumentation extends ClassInstanceMethodsEnhancePluginDef
@Override
protected String[] witnessClasses() {
return new String[] {"graphql.cachecontrol.CacheControl"};
return new String[] {
"graphql.cachecontrol.CacheControl",
"graphql.execution.ExecutionPath"
};
}
}

View File

@ -64,6 +64,10 @@ public class GraphqlInstrumentation extends ClassInstanceMethodsEnhancePluginDef
@Override
protected String[] witnessClasses() {
return new String[] {"graphql.util.SimpleTraverserContext", "graphql.analysis.FieldVisitor"};
return new String[] {
"graphql.util.SimpleTraverserContext",
"graphql.analysis.FieldVisitor",
"graphql.execution.ExecutionPath"
};
}
}

View File

@ -64,6 +64,10 @@ public class GraphqlInstrumentation extends ClassInstanceMethodsEnhancePluginDef
@Override
protected String[] witnessClasses() {
return new String[] {"graphql.util.SimpleTraverserContext", "graphql.analysis.QueryVisitor"};
return new String[] {
"graphql.util.SimpleTraverserContext",
"graphql.analysis.QueryVisitor",
"graphql.execution.ExecutionPath"
};
}
}

View File

@ -73,6 +73,9 @@ public class ClusteredEventBusSendRemoteInstrumentation extends ClassInstanceMet
@Override
protected String[] witnessClasses() {
return new String[] {"io.vertx.core.eventbus.impl.clustered.ClusteredMessage"};
return new String[] {
"io.vertx.core.eventbus.impl.clustered.ClusteredMessage",
"io.vertx.core.http.impl.WebSocketFrameFactoryImpl"
};
}
}

View File

@ -73,6 +73,9 @@ public class EventBusImplDeliverToHandlerInstrumentation extends ClassInstanceMe
@Override
protected String[] witnessClasses() {
return new String[] {"io.vertx.core.eventbus.impl.clustered.ClusteredMessage"};
return new String[] {
"io.vertx.core.eventbus.impl.clustered.ClusteredMessage",
"io.vertx.core.http.impl.WebSocketFrameFactoryImpl"
};
}
}

View File

@ -73,6 +73,9 @@ public class HandlerRegistrationInstrumentation extends ClassInstanceMethodsEnha
@Override
protected String[] witnessClasses() {
return new String[] {"io.vertx.core.eventbus.impl.clustered.ClusteredMessage"};
return new String[] {
"io.vertx.core.eventbus.impl.clustered.ClusteredMessage",
"io.vertx.core.http.impl.WebSocketFrameFactoryImpl"
};
}
}

View File

@ -70,4 +70,9 @@ public class HttpClientRequestImplHandleExceptionInstrumentation extends ClassIn
protected ClassMatch enhanceClass() {
return NameMatch.byName(ENHANCE_CLASS);
}
@Override
protected String[] witnessClasses() {
return new String[] {"io.vertx.core.http.impl.WebSocketFrameFactoryImpl"};
}
}

View File

@ -72,4 +72,9 @@ public class HttpClientRequestImplHandleResponseInstrumentation extends ClassIns
protected ClassMatch enhanceClass() {
return NameMatch.byName(ENHANCE_CLASS);
}
@Override
protected String[] witnessClasses() {
return new String[] {"io.vertx.core.http.impl.WebSocketFrameFactoryImpl"};
}
}

View File

@ -106,4 +106,9 @@ public class HttpClientRequestImplInstrumentation extends ClassInstanceMethodsEn
protected ClassMatch enhanceClass() {
return NameMatch.byName(ENHANCE_CLASS);
}
@Override
protected String[] witnessClasses() {
return new String[] {"io.vertx.core.http.impl.WebSocketFrameFactoryImpl"};
}
}

View File

@ -72,4 +72,9 @@ public class HttpContextHandleDispatchResponseInstrumentation extends ClassInsta
protected ClassMatch enhanceClass() {
return NameMatch.byName(ENHANCE_CLASS);
}
@Override
protected String[] witnessClasses() {
return new String[] {"io.vertx.core.http.impl.WebSocketFrameFactoryImpl"};
}
}

View File

@ -70,4 +70,9 @@ public class HttpContextSendRequestInstrumentation extends ClassInstanceMethodsE
protected ClassMatch enhanceClass() {
return NameMatch.byName(ENHANCE_CLASS);
}
@Override
protected String[] witnessClasses() {
return new String[] {"io.vertx.core.http.impl.WebSocketFrameFactoryImpl"};
}
}

View File

@ -64,4 +64,9 @@ public class HttpServerRequestImplConstructorInstrumentation extends ClassInstan
protected ClassMatch enhanceClass() {
return NameMatch.byName(ENHANCE_CLASS);
}
@Override
protected String[] witnessClasses() {
return new String[] {"io.vertx.core.http.impl.WebSocketFrameFactoryImpl"};
}
}

View File

@ -64,4 +64,9 @@ public class HttpServerRequestWrapperConstructorInstrumentation extends ClassIns
protected ClassMatch enhanceClass() {
return NameMatch.byName(ENHANCE_CLASS);
}
@Override
protected String[] witnessClasses() {
return new String[] {"io.vertx.core.http.impl.WebSocketFrameFactoryImpl"};
}
}

View File

@ -70,4 +70,9 @@ public class HttpServerResponseImplHandleExceptionInstrumentation extends ClassI
protected ClassMatch enhanceClass() {
return NameMatch.byName(ENHANCE_CLASS);
}
@Override
protected String[] witnessClasses() {
return new String[] {"io.vertx.core.http.impl.WebSocketFrameFactoryImpl"};
}
}

View File

@ -88,4 +88,9 @@ public class HttpServerResponseImplInstrumentation extends ClassInstanceMethodsE
protected ClassMatch enhanceClass() {
return NameMatch.byName(ENHANCE_CLASS);
}
@Override
protected String[] witnessClasses() {
return new String[] {"io.vertx.core.http.impl.WebSocketFrameFactoryImpl"};
}
}

View File

@ -72,4 +72,9 @@ public class RouteImplHandlerInstrumentation extends ClassInstanceMethodsEnhance
protected ClassMatch enhanceClass() {
return NameMatch.byName(ENHANCE_CLASS);
}
@Override
protected String[] witnessClasses() {
return new String[] {"io.vertx.core.http.impl.WebSocketFrameFactoryImpl"};
}
}

View File

@ -85,4 +85,9 @@ public class RouteImplInstrumentation extends ClassInstanceMethodsEnhancePluginD
protected ClassMatch enhanceClass() {
return NameMatch.byName(ENHANCE_CLASS);
}
@Override
protected String[] witnessClasses() {
return new String[] {"io.vertx.core.http.impl.WebSocketFrameFactoryImpl"};
}
}

View File

@ -87,4 +87,9 @@ public class RouteStateInstrumentation extends ClassInstanceMethodsEnhancePlugin
protected ClassMatch enhanceClass() {
return NameMatch.byName(ENHANCE_CLASS);
}
@Override
protected String[] witnessClasses() {
return new String[] {"io.vertx.core.http.impl.WebSocketFrameFactoryImpl"};
}
}

View File

@ -64,4 +64,9 @@ public class RouterContextImplBaseConstructorInstrumentation extends ClassInstan
protected ClassMatch enhanceClass() {
return NameMatch.byName(ENHANCE_CLASS);
}
@Override
protected String[] witnessClasses() {
return new String[] {"io.vertx.core.http.impl.WebSocketFrameFactoryImpl"};
}
}

View File

@ -66,4 +66,9 @@ public class RoutingContextWrapperConstructorInstrumentation extends ClassInstan
protected ClassMatch enhanceClass() {
return NameMatch.byName(ENHANCE_CLASS);
}
@Override
protected String[] witnessClasses() {
return new String[] {"io.vertx.core.http.impl.WebSocketFrameFactoryImpl"};
}
}

View File

@ -74,4 +74,9 @@ public class ServerConnectionHandleMessageInstrumentation extends ClassInstanceM
SERVER_CONNECTION_ENHANCE_CLASS //ver. 3.0.0 - 3.5.0
);
}
@Override
protected String[] witnessClasses() {
return new String[] {"io.vertx.core.http.impl.WebSocketFrameFactoryImpl"};
}
}