public class TracingHttpRequesterFilter extends java.lang.Object implements StreamingHttpClientFilterFactory, StreamingHttpConnectionFilterFactory, HttpExecutionStrategyInfluencer
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
componentName |
protected InMemoryTraceStateFormat<HttpHeaders> |
formatter |
protected io.opentracing.Tracer |
tracer |
Constructor and Description |
---|
TracingHttpRequesterFilter(io.opentracing.Tracer tracer,
java.lang.String componentName)
Create a new instance.
|
TracingHttpRequesterFilter(io.opentracing.Tracer tracer,
java.lang.String componentName,
boolean validateTraceKeyFormat)
Create a new instance.
|
Modifier and Type | Method and Description |
---|---|
StreamingHttpClientFilter |
create(FilterableStreamingHttpClient client)
Creates a
StreamingHttpClientFilter using the provided StreamingHttpClientFilter . |
StreamingHttpConnectionFilter |
create(FilterableStreamingHttpConnection connection)
Create a
StreamingHttpConnectionFilter using the provided FilterableStreamingHttpConnection . |
HttpExecutionStrategy |
influenceStrategy(HttpExecutionStrategy strategy)
Optionally modify the passed
HttpExecutionStrategy to a new HttpExecutionStrategy that suits
this HttpExecutionStrategyInfluencer . |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
append, asMultiAddressClientFilter
append
defaultStreamingInfluencer
protected final io.opentracing.Tracer tracer
protected final java.lang.String componentName
protected final InMemoryTraceStateFormat<HttpHeaders> formatter
public TracingHttpRequesterFilter(io.opentracing.Tracer tracer, java.lang.String componentName)
tracer
- The Tracer
.componentName
- The component name used during building new spans.public TracingHttpRequesterFilter(io.opentracing.Tracer tracer, java.lang.String componentName, boolean validateTraceKeyFormat)
tracer
- The Tracer
.componentName
- The component name used during building new spans.validateTraceKeyFormat
- true
to validate the contents of the trace ids.public final StreamingHttpClientFilter create(FilterableStreamingHttpClient client)
StreamingHttpClientFilterFactory
StreamingHttpClientFilter
using the provided StreamingHttpClientFilter
.create
in interface StreamingHttpClientFilterFactory
client
- FilterableStreamingHttpClient
to filterStreamingHttpClientFilter
using the provided StreamingHttpClientFilter
.public final StreamingHttpConnectionFilter create(FilterableStreamingHttpConnection connection)
StreamingHttpConnectionFilterFactory
StreamingHttpConnectionFilter
using the provided FilterableStreamingHttpConnection
.create
in interface StreamingHttpConnectionFilterFactory
connection
- FilterableStreamingHttpConnection
to filterStreamingHttpConnectionFilter
using the provided FilterableStreamingHttpConnection
.public HttpExecutionStrategy influenceStrategy(HttpExecutionStrategy strategy)
HttpExecutionStrategyInfluencer
HttpExecutionStrategy
to a new HttpExecutionStrategy
that suits
this HttpExecutionStrategyInfluencer
.influenceStrategy
in interface HttpExecutionStrategyInfluencer
strategy
- HttpExecutionStrategy
to influence.HttpExecutionStrategy
that suits this HttpExecutionStrategyInfluencer