Class ServletHttpServerTracer<REQUEST,RESPONSE>
- java.lang.Object
-
- io.opentelemetry.instrumentation.api.tracer.BaseTracer
-
- io.opentelemetry.instrumentation.api.tracer.HttpServerTracer<REQUEST,RESPONSE,REQUEST,REQUEST>
-
- io.opentelemetry.instrumentation.servlet.ServletHttpServerTracer<REQUEST,RESPONSE>
-
public abstract class ServletHttpServerTracer<REQUEST,RESPONSE> extends io.opentelemetry.instrumentation.api.tracer.HttpServerTracer<REQUEST,RESPONSE,REQUEST,REQUEST>
-
-
Constructor Summary
Constructors Constructor Description ServletHttpServerTracer(ServletAccessor<REQUEST,RESPONSE> accessor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddUnwrappedThrowable(io.opentelemetry.context.Context context, Throwable throwable)voidendExceptionally(io.opentelemetry.context.Context context, Throwable throwable, RESPONSE response, long timestamp)ThrowableerrorException(REQUEST request)io.opentelemetry.context.ContextgetServerContext(REQUEST request)ServletAccessor<REQUEST,RESPONSE>getServletAccessor()StringgetSpanName(REQUEST request)booleanneedsRescoping(io.opentelemetry.context.Context attachedContext)voidonTimeout(io.opentelemetry.context.Context context, long timeout)voidsetPrincipal(io.opentelemetry.context.Context context, REQUEST request)io.opentelemetry.context.ContextstartSpan(REQUEST request, String spanName, boolean servlet)io.opentelemetry.context.ContextupdateContext(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.voidupdateSpanName(REQUEST request)-
Methods inherited from class io.opentelemetry.instrumentation.api.tracer.HttpServerTracer
end, end, endExceptionally, endExceptionally, getServerSpan, startSpan, startSpan, startSpan
-
-
-
-
Constructor Detail
-
ServletHttpServerTracer
public ServletHttpServerTracer(ServletAccessor<REQUEST,RESPONSE> accessor)
-
-
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)
-
getServerContext
public io.opentelemetry.context.Context getServerContext(REQUEST request)
-
getServletAccessor
public ServletAccessor<REQUEST,RESPONSE> getServletAccessor()
-
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)
-
-