Migrate trace_methods to indy plugin#2094
Conversation
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
Trends 🧪💚 Flaky test reportTests succeeded. Expand to view the summary
Test stats 🧪
|
| import static co.elastic.apm.agent.matcher.AnnotationMatcher.annotationMatcher; | ||
| import static co.elastic.apm.agent.matcher.WildcardMatcher.caseSensitiveMatcher; | ||
|
|
||
| @GlobalState |
There was a problem hiding this comment.
[question] If I understand it correctly, we only need global state here as it relates to configuration like MethodMatcherValueConverter, and thus needs to be loaded in the main agent classloader and not in the plugin classloader, is that correct ? If so, maybe a small comment could make that slightly more obvious.
There was a problem hiding this comment.
Correct. Agree on adding an explanatory comment.
|
|
||
| public static class TraceMethodAdvice { | ||
|
|
||
| private static final ElasticApmTracer tracer = GlobalTracer.requireTracerImpl(); |
There was a problem hiding this comment.
[minor] moving tracer init to the start of the static block makes the dependency to retrieve configuration obvious.
What does this PR do?
Relates to #1337
Checklist