-
Notifications
You must be signed in to change notification settings - Fork 867
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
Instrument spring-web 6 & spring-webmvc 6 #7366
Instrument spring-web 6 & spring-webmvc 6 #7366
Conversation
aeeb340
to
61a832f
Compare
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.
do you think we should port ServletFilterTest
to 6.0 at some point?
.../java/io/opentelemetry/javaagent/instrumentation/spring/webmvc/HandlerSpanNameExtractor.java
Outdated
Show resolved
Hide resolved
if (springCtx.containsBean("otelAutoDispatcherFilter")) { | ||
OpenTelemetryHandlerMappingFilter filter = | ||
(OpenTelemetryHandlerMappingFilter) springCtx.getBean("otelAutoDispatcherFilter"); | ||
if (handlerMappings != null) { |
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.
what was reason for not keeping the filter != null
condition?
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.
getBean()
will never return null - it'll either return the filter or throw.
Yeah, we should. I didn't want to do it in this PR, as it's already quite huge. I'll add the test in one of the next PRs. |
Part of #7203
This PR is mostly copy-paste and working around the differences, conceptually the new instrumentation is the same as the old one