Class: Datadog::Tracing::Pipeline::SpanFilter

Inherits:
SpanProcessor show all
Defined in:
lib/datadog/tracing/pipeline/span_filter.rb,
sig/datadog/tracing/pipeline/span_filter.rbs

Overview

SpanFilter implements a processor that filters entire span subtrees This processor executes the configured operation for each Span in a TraceSegment.

If operation returns a truthy value for a span, that span is dropped, otherwise the span is kept.

Instance Method Summary collapse

Methods inherited from SpanProcessor

#initialize

Constructor Details

This class inherits a constructor from Datadog::Tracing::Pipeline::SpanProcessor

Instance Method Details

#drop_it?(span) ⇒ Boolean

Parameters:

  • span (Object)

Returns:

  • (Boolean)


40
41
42
43
44
# File 'lib/datadog/tracing/pipeline/span_filter.rb', line 40

def drop_it?(span)
  @operation.call(span)
rescue
  false
end