Class OpenTelemetryServerFilter

java.lang.Object
io.micronaut.tracing.opentelemetry.instrument.http.AbstractOpenTelemetryFilter
io.micronaut.tracing.opentelemetry.instrument.http.server.OpenTelemetryServerFilter
All Implemented Interfaces:
io.micronaut.core.order.Ordered, io.micronaut.http.filter.HttpFilter, io.micronaut.http.filter.HttpServerFilter

@Internal @Filter("${tracing.http.server.path:/**}") @Requires(beans=io.opentelemetry.api.trace.Tracer.class) public final class OpenTelemetryServerFilter extends AbstractOpenTelemetryFilter implements io.micronaut.http.filter.HttpServerFilter
An HTTP server instrumentation filter that uses Open Telemetry.
Since:
4.2.0
  • Field Summary

    Fields inherited from class io.micronaut.tracing.opentelemetry.instrument.http.AbstractOpenTelemetryFilter

    CLIENT_PATH, SERVER_PATH, TAG_ERROR

    Fields inherited from interface io.micronaut.core.order.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Constructor Summary

    Constructors
    Constructor
    Description
    OpenTelemetryServerFilter(@Nullable io.micronaut.tracing.opentelemetry.instrument.util.OpenTelemetryExclusionsConfiguration exclusionsConfig, io.opentelemetry.instrumentation.api.instrumenter.Instrumenter<io.micronaut.http.HttpRequest<?>,Object> instrumenter)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.reactivestreams.Publisher<io.micronaut.http.MutableHttpResponse<?>>
    doFilter(io.micronaut.http.HttpRequest<?> request, io.micronaut.http.filter.ServerFilterChain chain)
     

    Methods inherited from class io.micronaut.tracing.opentelemetry.instrument.http.AbstractOpenTelemetryFilter

    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.HttpServerFilter

    doFilter

    Methods inherited from interface io.micronaut.core.order.Ordered

    getOrder
  • Constructor Details

    • OpenTelemetryServerFilter

      public OpenTelemetryServerFilter(@Nullable @Nullable io.micronaut.tracing.opentelemetry.instrument.util.OpenTelemetryExclusionsConfiguration exclusionsConfig, @Named("micronautHttpServerTelemetryInstrumenter") io.opentelemetry.instrumentation.api.instrumenter.Instrumenter<io.micronaut.http.HttpRequest<?>,Object> instrumenter)
      Parameters:
      exclusionsConfig - The OpenTelemetryExclusionsConfiguration
      instrumenter - The OpenTelemetryHttpServerConfig
  • Method Details

    • doFilter

      public org.reactivestreams.Publisher<io.micronaut.http.MutableHttpResponse<?>> doFilter(io.micronaut.http.HttpRequest<?> request, io.micronaut.http.filter.ServerFilterChain chain)
      Specified by:
      doFilter in interface io.micronaut.http.filter.HttpServerFilter