Sha256: b6d35336f61c929d7c2aa03e00bb01879307216124aef61820ac5575d869d6eb

Contents?: true

Size: 413 Bytes

Versions: 94

Compression:

Stored size: 413 Bytes

Contents

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

94 entries across 94 versions & 2 rubygems

Version Path
ddtrace-0.51.1 lib/ddtrace/pipeline/span_processor.rb
ddtrace-0.51.0 lib/ddtrace/pipeline/span_processor.rb
ddtrace-0.50.0 lib/ddtrace/pipeline/span_processor.rb
ddtrace-0.49.0 lib/ddtrace/pipeline/span_processor.rb
ddtrace-0.48.0 lib/ddtrace/pipeline/span_processor.rb
ddtrace-0.47.0 lib/ddtrace/pipeline/span_processor.rb
ddtrace-0.46.0 lib/ddtrace/pipeline/span_processor.rb
ddtrace-0.45.0 lib/ddtrace/pipeline/span_processor.rb
ddtrace-0.44.0 lib/ddtrace/pipeline/span_processor.rb
ddtrace-0.43.0 lib/ddtrace/pipeline/span_processor.rb
ddtrace-0.42.0 lib/ddtrace/pipeline/span_processor.rb
ddtrace-0.41.0 lib/ddtrace/pipeline/span_processor.rb
ls-trace-0.2.0 lib/ddtrace/pipeline/span_processor.rb
ddtrace-0.40.0 lib/ddtrace/pipeline/span_processor.rb
ddtrace-0.39.0 lib/ddtrace/pipeline/span_processor.rb
ddtrace-0.38.0 lib/ddtrace/pipeline/span_processor.rb
ddtrace-0.37.0 lib/ddtrace/pipeline/span_processor.rb
ddtrace-0.36.0 lib/ddtrace/pipeline/span_processor.rb
ls-trace-0.1.2 lib/ddtrace/pipeline/span_processor.rb
ddtrace-0.35.2 lib/ddtrace/pipeline/span_processor.rb