Class ServletHttpServerTracer<REQUEST,​RESPONSE>


  • public abstract class ServletHttpServerTracer<REQUEST,​RESPONSE>
    extends io.opentelemetry.instrumentation.api.tracer.HttpServerTracer<REQUEST,​RESPONSE,​REQUEST,​REQUEST>
    • Method Detail

      • startSpan

        public io.opentelemetry.context.Context startSpan​(REQUEST request,
                                                          String spanName,
                                                          boolean servlet)
      • endExceptionally

        public void endExceptionally​(io.opentelemetry.context.Context context,
                                     Throwable throwable,
                                     RESPONSE response,
                                     long timestamp)
        Overrides:
        endExceptionally in class io.opentelemetry.instrumentation.api.tracer.HttpServerTracer<REQUEST,​RESPONSE,​REQUEST,​REQUEST>
      • getServerContext

        public io.opentelemetry.context.Context getServerContext​(REQUEST request)
        Specified by:
        getServerContext in class io.opentelemetry.instrumentation.api.tracer.HttpServerTracer<REQUEST,​RESPONSE,​REQUEST,​REQUEST>
      • addUnwrappedThrowable

        public void addUnwrappedThrowable​(io.opentelemetry.context.Context context,
                                          Throwable throwable)
      • setPrincipal

        public void setPrincipal​(io.opentelemetry.context.Context context,
                                 REQUEST request)
      • updateContext

        public io.opentelemetry.context.Context updateContext​(io.opentelemetry.context.Context context,
                                                              REQUEST request)
        When server spans are managed by app server instrumentation we need to add context path of current request to context if it isn't already added. Servlet instrumentation adds it when it starts server span.
      • updateSpanName

        public void updateSpanName​(REQUEST request)
      • onTimeout

        public void onTimeout​(io.opentelemetry.context.Context context,
                              long timeout)
      • needsRescoping

        public boolean needsRescoping​(io.opentelemetry.context.Context attachedContext)