Skip to content

Commit eee20a9

Browse files
committed
trace_digest and ext
1 parent 9d38187 commit eee20a9

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

lib/datadog/tracing/configuration/ext.rb

+6-1
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,13 @@ module Distributed
4040
# W3C Trace Context
4141
PROPAGATION_STYLE_TRACE_CONTEXT = 'tracecontext'
4242

43+
# W3C Baggage
44+
# @see https://www.w3.org/TR/baggage/
45+
PROPAGATION_STYLE_BAGGAGE = 'baggage'
46+
4347
PROPAGATION_STYLE_SUPPORTED = [PROPAGATION_STYLE_DATADOG, PROPAGATION_STYLE_B3_MULTI_HEADER,
44-
PROPAGATION_STYLE_B3_SINGLE_HEADER, PROPAGATION_STYLE_TRACE_CONTEXT].freeze
48+
PROPAGATION_STYLE_B3_SINGLE_HEADER, PROPAGATION_STYLE_TRACE_CONTEXT,
49+
PROPAGATION_STYLE_BAGGAGE].freeze
4550

4651
# Sets both extract and inject propagation style tho the provided value.
4752
# Has lower precedence than `DD_TRACE_PROPAGATION_STYLE_INJECT` or

lib/datadog/tracing/contrib/grpc/distributed/propagation.rb

+2
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ def initialize(
3131
Tracing::Distributed::Datadog.new(fetcher: Fetcher),
3232
Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_TRACE_CONTEXT =>
3333
Tracing::Distributed::TraceContext.new(fetcher: Fetcher),
34+
Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_BAGGAGE =>
35+
Tracing::Distributed::Baggage.new(fetcher: Fetcher),
3436
Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_NONE => Tracing::Distributed::None.new
3537
},
3638
propagation_style_inject: propagation_style_inject,

sig/datadog/tracing/configuration/ext.rbs

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ module Datadog
2323
PROPAGATION_STYLE_B3_MULTI_HEADER: "b3multi"
2424
PROPAGATION_STYLE_B3_SINGLE_HEADER: "b3"
2525
PROPAGATION_STYLE_TRACE_CONTEXT: "tracecontext"
26+
PROPAGATION_STYLE_BAGGAGE: "baggage"
2627
ENV_PROPAGATION_STYLE: "DD_TRACE_PROPAGATION_STYLE"
2728

2829
ENV_PROPAGATION_STYLE_INJECT: "DD_TRACE_PROPAGATION_STYLE_INJECT"

sig/datadog/tracing/trace_digest.rbs

+2-1
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,9 @@ module Datadog
2121
attr_reader trace_state: untyped
2222
attr_reader trace_state_unknown_fields: untyped
2323
attr_reader span_remote: untyped
24+
attr_reader baggage: untyped
2425

25-
def initialize: (?span_id: untyped?, ?span_name: untyped?, ?span_resource: untyped?, ?span_service: untyped?, ?span_type: untyped?, ?trace_distributed_tags: untyped?, ?trace_hostname: untyped?, ?trace_id: untyped?, ?trace_name: untyped?, ?trace_origin: untyped?, ?trace_process_id: untyped?, ?trace_resource: untyped?, ?trace_runtime_id: untyped?, ?trace_sampling_priority: untyped?, ?trace_service: untyped?, ?trace_distributed_id: untyped?, ?trace_flags: untyped?, ?trace_state: untyped?, ?trace_state_unknown_fields: untyped?, ?span_remote: untyped?) -> void
26+
def initialize: (?span_id: untyped?, ?span_name: untyped?, ?span_resource: untyped?, ?span_service: untyped?, ?span_type: untyped?, ?trace_distributed_tags: untyped?, ?trace_hostname: untyped?, ?trace_id: untyped?, ?trace_name: untyped?, ?trace_origin: untyped?, ?trace_process_id: untyped?, ?trace_resource: untyped?, ?trace_runtime_id: untyped?, ?trace_sampling_priority: untyped?, ?trace_service: untyped?, ?trace_distributed_id: untyped?, ?trace_flags: untyped?, ?trace_state: untyped?, ?trace_state_unknown_fields: untyped?, ?span_remote: untyped?, ?baggage: untyped?) -> void
2627
end
2728
end
2829
end

0 commit comments

Comments
 (0)