Skip to content
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

Merged
merged 6 commits into from
Sep 16, 2021

Conversation

laurit
Copy link
Contributor

@laurit laurit commented Sep 14, 2021

Addresses a review comment from #4078

}
return context;
protected Context addServletContextPath(Context context, REQUEST request) {
return ServletContextPath.init(context, () -> accessor.getRequestContextPath(request));
Copy link
Member

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?

Comment on lines -25 to +26
public static final ContextKey<String> CONTEXT_KEY =
private static final ContextKey<ServletContextPath> CONTEXT_KEY =
Copy link
Member

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?

Copy link
Contributor Author

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.

laurit and others added 2 commits September 15, 2021 13:37
…o/opentelemetry/instrumentation/servlet/ServletHttpServerTracer.java

Co-authored-by: Mateusz Rzeszutek <mrzeszutek@splunk.com>
@trask trask merged commit 59439cb into open-telemetry:main Sep 16, 2021
@laurit laurit deleted the make-context-path-key-private branch July 6, 2023 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants