Class CompositeSpanHandler

java.lang.Object
brave.handler.SpanHandler
io.micrometer.tracing.brave.bridge.CompositeSpanHandler

public class CompositeSpanHandler extends brave.handler.SpanHandler
Wraps the SpanHandler with additional predicate, reporting and filtering logic.
Since:
1.0.0
  • Nested Class Summary

    Nested classes/interfaces inherited from class brave.handler.SpanHandler

    brave.handler.SpanHandler.Cause
  • Field Summary

    Fields inherited from class brave.handler.SpanHandler

    NOOP
  • Constructor Summary

    Constructors
    Constructor
    Description
    CompositeSpanHandler(List<io.micrometer.tracing.exporter.SpanExportingPredicate> predicates, List<io.micrometer.tracing.exporter.SpanReporter> reporters, List<io.micrometer.tracing.exporter.SpanFilter> spanFilters)
    Creates a new instance of CompositeSpanHandler.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    end(brave.propagation.TraceContext context, brave.handler.MutableSpan span, brave.handler.SpanHandler.Cause cause)
     

    Methods inherited from class brave.handler.SpanHandler

    begin, handlesAbandoned

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CompositeSpanHandler

      public CompositeSpanHandler(@Nullable List<io.micrometer.tracing.exporter.SpanExportingPredicate> predicates, @Nullable List<io.micrometer.tracing.exporter.SpanReporter> reporters, @Nullable List<io.micrometer.tracing.exporter.SpanFilter> spanFilters)
      Creates a new instance of CompositeSpanHandler.
      Parameters:
      predicates - predicates that decide which spans should be exported
      reporters - reporters that export spans
      spanFilters - filters that mutate spans before reporting them
  • Method Details

    • end

      public boolean end(brave.propagation.TraceContext context, brave.handler.MutableSpan span, brave.handler.SpanHandler.Cause cause)
      Overrides:
      end in class brave.handler.SpanHandler