Class TraceMethodInstrumentation
- java.lang.Object
-
- co.elastic.apm.agent.sdk.ElasticApmInstrumentation
-
- co.elastic.apm.agent.bci.TracerAwareInstrumentation
-
- co.elastic.apm.agent.bci.methodmatching.TraceMethodInstrumentation
-
public class TraceMethodInstrumentation extends TracerAwareInstrumentation
-
-
Field Summary
Fields Modifier and Type Field Description protected MethodMatchermethodMatcherstatic longtraceMethodThresholdMicros-
Fields inherited from class co.elastic.apm.agent.bci.TracerAwareInstrumentation
tracer
-
-
Constructor Summary
Constructors Constructor Description TraceMethodInstrumentation(ElasticApmTracer tracer, MethodMatcher methodMatcher)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<java.lang.String>getInstrumentationGroupNames()net.bytebuddy.matcher.ElementMatcher<? super net.bytebuddy.description.method.MethodDescription>getMethodMatcher()net.bytebuddy.matcher.ElementMatcher<? super net.bytebuddy.description.type.TypeDescription>getTypeMatcher()booleanindyPlugin()Allows to opt-out of indy plugins.static voidonMethodEnter(java.lang.Class<?> clazz, java.lang.String signature, AbstractSpan<?> span)static voidonMethodExit(AbstractSpan<?> span, java.lang.Throwable t)
-
-
-
Field Detail
-
traceMethodThresholdMicros
public static long traceMethodThresholdMicros
-
methodMatcher
protected final MethodMatcher methodMatcher
-
-
Constructor Detail
-
TraceMethodInstrumentation
public TraceMethodInstrumentation(ElasticApmTracer tracer, MethodMatcher methodMatcher)
-
-
Method Detail
-
onMethodEnter
@OnMethodEnter(suppress=java.lang.Throwable.class) public static void onMethodEnter(@Origin java.lang.Class<?> clazz, java.lang.String signature, @Local("span") AbstractSpan<?> span)
-
onMethodExit
@OnMethodExit(suppress=java.lang.Throwable.class, onThrowable=java.lang.Throwable.class) public static void onMethodExit(@Local("span") @Nullable AbstractSpan<?> span, @Thrown @Nullable java.lang.Throwable t)
-
getTypeMatcher
public net.bytebuddy.matcher.ElementMatcher<? super net.bytebuddy.description.type.TypeDescription> getTypeMatcher()
- Specified by:
getTypeMatcherin classco.elastic.apm.agent.sdk.ElasticApmInstrumentation
-
getMethodMatcher
public net.bytebuddy.matcher.ElementMatcher<? super net.bytebuddy.description.method.MethodDescription> getMethodMatcher()
- Specified by:
getMethodMatcherin classco.elastic.apm.agent.sdk.ElasticApmInstrumentation
-
getInstrumentationGroupNames
public java.util.Collection<java.lang.String> getInstrumentationGroupNames()
- Specified by:
getInstrumentationGroupNamesin classco.elastic.apm.agent.sdk.ElasticApmInstrumentation
-
indyPlugin
public boolean indyPlugin()
Description copied from class:TracerAwareInstrumentationAllows to opt-out of indy plugins. This is just to allow for a migration period where both indy and non-indy plugins are in use. Once all non-indy plugins are migrated this method will be removed.- Overrides:
indyPluginin classTracerAwareInstrumentation- Returns:
- whether to load the classes of this plugin in dedicated plugin class loaders (one for each unique class loader)
and dispatch to the advice via an
INVOKEDYNAMICinstruction.
-
-