Module: Datadog::Pipeline

Defined in:
lib/ddtrace/pipeline.rb,
lib/ddtrace/pipeline/span_filter.rb,
lib/ddtrace/pipeline/span_processor.rb

Overview

Pipeline

Defined Under Namespace

Classes: SpanFilter, SpanProcessor

Class Method Summary collapse

Class Method Details

.before_flush(*processors, &processor_block) ⇒ Object


10
11
12
13
14
15
16
# File 'lib/ddtrace/pipeline.rb', line 10

def self.before_flush(*processors, &processor_block)
  processors = [processor_block] if processors.empty?

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

.process!(traces) ⇒ Object


18
19
20
21
22
23
24
# File 'lib/ddtrace/pipeline.rb', line 18

def self.process!(traces)
  @mutex.synchronize do
    traces
      .map(&method(:apply_processors!))
      .select(&:any?)
  end
end

.processors=(value) ⇒ Object


26
27
28
# File 'lib/ddtrace/pipeline.rb', line 26

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