Class OpenTelemetryHttpRequesterFilter
- All Implemented Interfaces:
HttpExecutionStrategyInfluencer,StreamingHttpClientFilterFactory,StreamingHttpConnectionFilterFactory,ExecutionStrategyInfluencer<HttpExecutionStrategy>
The filter gets a Tracer with "io.servicetalk" instrumentation scope name.
Append this filter before others that are expected to see Scope for this request/response. Filters
appended after this filter that use operators with the after* prefix on
response meta data or the
StreamingHttpResponse.transformMessageBody(UnaryOperator) response message body}
(e.g. Publisher.afterFinally(Runnable)) will execute after this filter invokes Scope.close() and
therefore will not see the Span for the current request/response.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder for constructingOpenTelemetryHttpRequesterFilterinstances. -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.OpenTelemetryHttpRequesterFilter(String componentName) Deprecated.use theOpenTelemetryHttpRequesterFilter.Builderto create new filter instances.OpenTelemetryHttpRequesterFilter(String componentName, OpenTelemetryOptions opentelemetryOptions) Deprecated.use theOpenTelemetryHttpRequesterFilter.Builderto create new filter instances. -
Method Summary
Modifier and TypeMethodDescriptioncreate(FilterableStreamingHttpClient client) Creates aStreamingHttpClientFilterusing the providedStreamingHttpClientFilter.create(FilterableStreamingHttpConnection connection) Create aStreamingHttpConnectionFilterusing the providedFilterableStreamingHttpConnection.final HttpExecutionStrategyReturn anExecutionStrategythat describes the offloads required by the influencer.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.servicetalk.http.api.HttpExecutionStrategyInfluencer
influenceStrategy, requiredOffloads
-
Constructor Details
-
OpenTelemetryHttpRequesterFilter
Deprecated.use theOpenTelemetryHttpRequesterFilter.Builderto create new filter instances.Create a new instance, searching for any instance of an opentelemetry available.- Parameters:
componentName- The component name used during building new spans.
-
OpenTelemetryHttpRequesterFilter
@Deprecated public OpenTelemetryHttpRequesterFilter(String componentName, OpenTelemetryOptions opentelemetryOptions) Deprecated.use theOpenTelemetryHttpRequesterFilter.Builderto create new filter instances.Create a new instance, searching for any instance of an opentelemetry available.- Parameters:
componentName- The component name used during building new spans.opentelemetryOptions- extra options to create the opentelemetry filter
-
OpenTelemetryHttpRequesterFilter
Deprecated.use theOpenTelemetryHttpRequesterFilter.Builderto create new filter instances.Create a new instance, searching for any instance of an opentelemetry available, using the hostname as the component name.
-
-
Method Details
-
create
Description copied from interface:StreamingHttpClientFilterFactoryCreates aStreamingHttpClientFilterusing the providedStreamingHttpClientFilter.- Specified by:
createin interfaceStreamingHttpClientFilterFactory- Parameters:
client-FilterableStreamingHttpClientto filter- Returns:
StreamingHttpClientFilterusing the providedStreamingHttpClientFilter.
-
create
Description copied from interface:StreamingHttpConnectionFilterFactoryCreate aStreamingHttpConnectionFilterusing the providedFilterableStreamingHttpConnection.- Specified by:
createin interfaceStreamingHttpConnectionFilterFactory- Parameters:
connection-FilterableStreamingHttpConnectionto filter- Returns:
StreamingHttpConnectionFilterusing the providedFilterableStreamingHttpConnection.
-
requiredOffloads
Description copied from interface:HttpExecutionStrategyInfluencerReturn anExecutionStrategythat describes the offloads required by the influencer.The provided default implementation requests offloading of all operations. Implementations that require no offloading should be careful to return
HttpExecutionStrategies.offloadNone()rather thanHttpExecutionStrategies.offloadNever(). Implementations should avoid returningHttpExecutionStrategies.defaultStrategy(), instead returning the strategy they require orHttpExecutionStrategies.offloadAll()if offloading for all paths is required (safe default).- Specified by:
requiredOffloadsin interfaceExecutionStrategyInfluencer<HttpExecutionStrategy>- Specified by:
requiredOffloadsin interfaceHttpExecutionStrategyInfluencer- Returns:
- the
ExecutionStrategyrequired by the influencer.
-
OpenTelemetryHttpRequesterFilter.Builderto create new filter instances.