Class ServletContextPath
- java.lang.Object
-
- io.opentelemetry.instrumentation.api.servlet.ServletContextPath
-
public class ServletContextPath extends Object
The context key here is used to propagate the servlet context path throughout the request, so that routing framework instrumentation that updates the span name with a more specific route can prepend the servlet context path in front of that route.This needs to be in the instrumentation-api module, instead of injected as a helper class into the different modules that need it, in order to make sure that there is only a single instance of the context key, since otherwise instrumentation across different class loaders would use different context keys and not be able to share the servlet context path.
-
-
Field Summary
Fields Modifier and Type Field Description static io.opentelemetry.context.ContextKey<String>CONTEXT_KEY
-
Constructor Summary
Constructors Constructor Description ServletContextPath()
-