-
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
Make servlet context path key private #4125
Make servlet context path key private #4125
Conversation
} | ||
return context; | ||
protected Context addServletContextPath(Context context, REQUEST request) { | ||
return ServletContextPath.init(context, () -> accessor.getRequestContextPath(request)); |
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.
can we do non-capturing lambda here similar to #4014?
public static final ContextKey<String> CONTEXT_KEY = | ||
private static final ContextKey<ServletContextPath> CONTEXT_KEY = |
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 we need the ServletContextPath
wrapper object?
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.
Using wrapper helps to distinguish context path not yet set from context path empty. I guess I could use ""
to mark empty context path.
.../library/src/main/java/io/opentelemetry/instrumentation/servlet/ServletHttpServerTracer.java
Outdated
Show resolved
Hide resolved
…o/opentelemetry/instrumentation/servlet/ServletHttpServerTracer.java Co-authored-by: Mateusz Rzeszutek <[email protected]>
Addresses a review comment from #4078