Class OpenTelemetryHttpServerFilter

java.lang.Object
io.servicetalk.opentelemetry.http.OpenTelemetryHttpServerFilter
All Implemented Interfaces:
HttpExecutionStrategyInfluencer, StreamingHttpServiceFilterFactory, ExecutionStrategyInfluencer<HttpExecutionStrategy>

@Deprecated public final class OpenTelemetryHttpServerFilter extends Object
Deprecated.
A StreamingHttpService that supports open telemetry.

The filter gets a Tracer with "io.servicetalk" instrumentation scope name.

This filter propagates the OpenTelemetry Context (thus Span) so the ordering of filters is crucial.

  • Append this filter before others that are expected to see the Span for this request/response.
  • If you want to see the correct Span information for auto-drained requests (when a streaming request body was not consumed by the service), add the HttpRequestAutoDrainingServiceFilter immediately after.
  • To ensure tracing sees the same result status codes as the calling client, add the HttpExceptionMapperServiceFilter after this filter.
  • If you intend to use a HttpLifecycleObserver, add it using the the HttpLifecycleObserverServiceFilter after the tracing filter to ensure the correct Span information is present.
Be sure to use the HttpServerBuilder.appendNonOffloadingServiceFilter(StreamingHttpServiceFilterFactory) method for adding these filters as non-offloading filters are always added before offloading filters.