New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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 🧪
|
@@ -32,6 +33,7 @@ | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[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