Sha256: 0579ab7d848746085be3a3231168b8bd6a36ca3200f1b00d99195e3f2088e029

Contents?: true

Size: 427 Bytes

Versions: 5

Compression:

Stored size: 427 Bytes

Contents

# typed: true
module Datadog
  module Pipeline
    # SpanProcessor
    class SpanProcessor
      def initialize(operation = nil, &block)
        callable = operation || block

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

        @operation = operation || block
      end

      def call(trace)
        trace.each do |span|
          @operation.call(span) rescue next
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
ddtrace-0.54.2 lib/ddtrace/pipeline/span_processor.rb
ddtrace-0.54.1 lib/ddtrace/pipeline/span_processor.rb
ddtrace-0.54.0 lib/ddtrace/pipeline/span_processor.rb
ddtrace-0.53.0 lib/ddtrace/pipeline/span_processor.rb
ddtrace-0.52.0 lib/ddtrace/pipeline/span_processor.rb