Module: Datadog::Tracing::Pipeline

Defined in:
lib/datadog/tracing/pipeline.rb,
lib/datadog/tracing/pipeline/span_filter.rb,
lib/datadog/tracing/pipeline/span_processor.rb

Overview

Modifies traces through a set of filters and processors

Defined Under Namespace

Classes: SpanFilter, SpanProcessor

Class Method Summary collapse

Class Method Details

.before_flush(*processors) ⇒ Object .before_flush {|trace| ... } ⇒ Object

Overloads:

See Also:



25
26
27
28
29
30
31
# File 'lib/datadog/tracing/pipeline.rb', line 25

def self.before_flush(*processors, &processor_block)
  processors << processor_block if processor_block

  @mutex.synchronize do
    @processors.concat(processors)
  end
end

.process!(traces) ⇒ Object



33
34
35
36
37
38
39
# File 'lib/datadog/tracing/pipeline.rb', line 33

def self.process!(traces)
  @mutex.synchronize do
    traces
      .map { |trace| apply_processors!(trace) }
      .compact
  end
end

.processors=(value) ⇒ Object



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

def self.processors=(value)
  @processors = value
end