Sha256: fdd8cd78f6c51fdf80bcb800d126fe87bc9a96563b461ee49a6aa2b60959bf25

Contents?: true

Size: 578 Bytes

Versions: 63

Compression:

Stored size: 578 Bytes

Contents

module Datadog
  module OpenTracer
    # Creates new Datadog::OpenTracer::SpanContext
    module SpanContextFactory
      module_function

      def build(datadog_context:, baggage: {})
        SpanContext.new(
          datadog_context: datadog_context,
          baggage: baggage.dup
        )
      end

      def clone(span_context:, baggage: {})
        SpanContext.new(
          datadog_context: span_context.datadog_context,
          # Merge baggage from previous SpanContext
          baggage: span_context.baggage.merge(baggage)
        )
      end
    end
  end
end

Version data entries

63 entries across 63 versions & 2 rubygems

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