Class: Datadog::Tracing::Pipeline::SpanProcessor
- Inherits:
-
Object
- Object
- Datadog::Tracing::Pipeline::SpanProcessor
- 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
Instance Method Summary collapse
-
#initialize(operation = nil, &block) ⇒ Object
constructor
You can either provide an
operation
object or a block to this method.
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.
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 |