Class OpenTracingClientFilter
java.lang.Object
io.micronaut.tracing.opentracing.instrument.http.AbstractOpenTracingFilter
io.micronaut.tracing.opentracing.instrument.http.OpenTracingClientFilter
- All Implemented Interfaces:
io.micronaut.core.order.Ordered
,io.micronaut.http.filter.HttpClientFilter
,io.micronaut.http.filter.HttpFilter
@Internal
@Filter("${tracing.http.client.path:/**}")
@Requires(beans=io.opentracing.Tracer.class) @Requires(missingBeans=io.opentracing.noop.NoopTracer.class)
public final class OpenTracingClientFilter
extends AbstractOpenTracingFilter
implements io.micronaut.http.filter.HttpClientFilter
An HTTP client instrumentation filter that uses Open Tracing.
- Since:
- 1.0
- Author:
- graemerocher
-
Field Summary
Fields inherited from class io.micronaut.tracing.opentracing.instrument.http.AbstractOpenTracingFilter
CLIENT_PATH, conversionService, SERVER_PATH, TAG_ERROR, TAG_HTTP_CLIENT, TAG_HTTP_SERVER, TAG_HTTP_STATUS_CODE, TAG_METHOD, TAG_PATH, tracer
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorDescriptionOpenTracingClientFilter
(io.opentracing.Tracer tracer, io.micronaut.core.convert.ConversionService conversionService, @Nullable TracingExclusionsConfiguration exclusionsConfig) Initialize the open tracing client filter with tracer and exclusion configuration. -
Method Summary
Modifier and TypeMethodDescriptionorg.reactivestreams.Publisher<? extends io.micronaut.http.HttpResponse<?>>
doFilter
(io.micronaut.http.MutableHttpRequest<?> request, io.micronaut.http.filter.ClientFilterChain chain) Methods inherited from class io.micronaut.tracing.opentracing.instrument.http.AbstractOpenTracingFilter
newSpan, resolveSpanName, setErrorTags, setResponseTags, shouldExclude
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micronaut.http.filter.HttpClientFilter
doFilter
Methods inherited from interface io.micronaut.core.order.Ordered
getOrder
-
Constructor Details
-
OpenTracingClientFilter
public OpenTracingClientFilter(io.opentracing.Tracer tracer, io.micronaut.core.convert.ConversionService conversionService, @Nullable @Nullable TracingExclusionsConfiguration exclusionsConfig) Initialize the open tracing client filter with tracer and exclusion configuration.- Parameters:
tracer
- the tracer for span creation and configuring across arbitrary transportsconversionService
- theConversionService
instanceexclusionsConfig
- TheTracingExclusionsConfiguration
-
-
Method Details
-
doFilter
public org.reactivestreams.Publisher<? extends io.micronaut.http.HttpResponse<?>> doFilter(io.micronaut.http.MutableHttpRequest<?> request, io.micronaut.http.filter.ClientFilterChain chain) - Specified by:
doFilter
in interfaceio.micronaut.http.filter.HttpClientFilter
-