public abstract class AbstractOpenTracingFilter extends Object implements HttpFilter
| Modifier and Type | Field and Description |
|---|---|
static String |
CLIENT_PATH |
static String |
SERVER_PATH |
static String |
TAG_ERROR |
static String |
TAG_HTTP_CLIENT |
static String |
TAG_HTTP_SERVER |
static String |
TAG_HTTP_STATUS_CODE |
static String |
TAG_METHOD |
static String |
TAG_PATH |
protected io.opentracing.Tracer |
tracer |
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE| Constructor and Description |
|---|
AbstractOpenTracingFilter(io.opentracing.Tracer tracer)
Configure tracer in the filter for span creation and propagation across arbitrary transports.
|
| Modifier and Type | Method and Description |
|---|---|
protected io.opentracing.Tracer.SpanBuilder |
newSpan(HttpRequest<?> request,
io.opentracing.SpanContext spanContext)
Creates a new span for the given request and span context.
|
protected String |
resolveSpanName(HttpRequest<?> request)
Resolve the span name to use for the request.
|
protected void |
setErrorTags(io.opentracing.Span span,
Throwable error)
Sets the error tags to use on the span.
|
protected void |
setResponseTags(HttpRequest<?> request,
HttpResponse<?> response,
io.opentracing.Span span)
Sets the response tags.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdoFilterpublic static final String CLIENT_PATH
public static final String SERVER_PATH
public static final String TAG_METHOD
public static final String TAG_PATH
public static final String TAG_ERROR
public static final String TAG_HTTP_STATUS_CODE
public static final String TAG_HTTP_CLIENT
public static final String TAG_HTTP_SERVER
protected final io.opentracing.Tracer tracer
public AbstractOpenTracingFilter(io.opentracing.Tracer tracer)
tracer - The tracerprotected void setResponseTags(HttpRequest<?> request, HttpResponse<?> response, io.opentracing.Span span)
request - The requestresponse - The responsespan - The spanprotected void setErrorTags(io.opentracing.Span span,
Throwable error)
span - The spanerror - The errorprotected String resolveSpanName(HttpRequest<?> request)
request - The requestprotected io.opentracing.Tracer.SpanBuilder newSpan(HttpRequest<?> request, io.opentracing.SpanContext spanContext)
request - The requestspanContext - The span context