Sha256: ab5d819752e5c9c14d5438076bd096297d3ace1ff481af434f8d57723bcd949e
Contents?: true
Size: 757 Bytes
Versions: 22
Compression:
Stored size: 757 Bytes
Contents
# frozen_string_literal: true module Datadog module OpenTracer # Creates new Datadog::OpenTracer::SpanContext module SpanContextFactory module_function def build(datadog_context:, datadog_trace_digest: nil, baggage: {}) SpanContext.new( datadog_context: datadog_context, datadog_trace_digest: datadog_trace_digest, baggage: baggage.dup ) end def clone(span_context:, baggage: {}) SpanContext.new( datadog_context: span_context.datadog_context, datadog_trace_digest: span_context.datadog_trace_digest, # Merge baggage from previous SpanContext baggage: span_context.baggage.merge(baggage) ) end end end end
Version data entries
22 entries across 22 versions & 1 rubygems