Class ServletContextPath
- java.lang.Object
-
- io.opentelemetry.instrumentation.api.servlet.ServletContextPath
-
public final 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.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <REQUEST> io.opentelemetry.context.Contextinit(io.opentelemetry.context.Context context, Function<REQUEST,String> contextPathExtractor, REQUEST request)static Stringprepend(io.opentelemetry.context.Context context, String spanName)
-