Class: Datadog::Tracing::Pipeline::SpanProcessor

Inherits:
Object
  • Object
show all
Defined in:
lib/datadog/tracing/pipeline/span_processor.rb

Overview

This processor executes the configured operation for each Span in a TraceSegment.

Direct Known Subclasses

SpanFilter

Instance Method Summary collapse

Constructor Details

#initialize(operation = nil, &block) ⇒ Object

You can either provide an operation object or a block to this method.

Both have the same semantics as operation. operation is used if both operation and a block are present.

Parameters:



17
18
19
20
21
22
23
# File 'lib/datadog/tracing/pipeline/span_processor.rb', line 17

def initialize(operation = nil, &block)
  callable = operation || block

  raise(ArgumentError) unless callable.respond_to?(:call)

  @operation = operation || block
end