Class AbstractOpenTelemetryFilter

java.lang.Object
io.micronaut.tracing.opentelemetry.instrument.http.AbstractOpenTelemetryFilter
All Implemented Interfaces:
io.micronaut.core.order.Ordered, io.micronaut.http.filter.HttpFilter
Direct Known Subclasses:
OpenTelemetryClientFilter, OpenTelemetryServerFilter

@Internal public abstract class AbstractOpenTelemetryFilter extends Object implements io.micronaut.http.filter.HttpFilter
Abstract filter used for OpenTelemetry based HTTP tracing.
Since:
4.2.0
Author:
Nemanja Mikic
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     
    static final String
     

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

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    AbstractOpenTelemetryFilter(@Nullable Predicate<String> pathExclusionTest)
    Configure tracer in the filter for span creation and propagation across arbitrary transports.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
    shouldExclude(@Nullable String path)
    Tests if the defined path should be excluded from tracing.

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

    doFilter

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

    getOrder
  • Field Details

  • Constructor Details

    • AbstractOpenTelemetryFilter

      protected AbstractOpenTelemetryFilter(@Nullable @Nullable Predicate<String> pathExclusionTest)
      Configure tracer in the filter for span creation and propagation across arbitrary transports.
      Parameters:
      pathExclusionTest - for excluding URI paths from tracing
  • Method Details

    • shouldExclude

      protected boolean shouldExclude(@Nullable @Nullable String path)
      Tests if the defined path should be excluded from tracing.
      Parameters:
      path - the path
      Returns:
      true if the path should be excluded