Skip to content

Commit

Permalink
Merge pull request #3267 from DataDog/tonycthsu/add-b3-propagation-ex…
Browse files Browse the repository at this point in the history
…tract

Tracing: Add b3 for default extraction
  • Loading branch information
TonyCTHsu authored Nov 21, 2023
2 parents 5c8f37d + a08db1a commit 8e470dc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions lib/datadog/tracing/configuration/settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ def self.extended(base)
o.default(
[
Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_DATADOG,
Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_B3_MULTI_HEADER,
Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_B3_SINGLE_HEADER,
Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_TRACE_CONTEXT,
]
)
Expand Down
6 changes: 5 additions & 1 deletion spec/datadog/tracing/configuration/settings_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@
it do
is_expected.to contain_exactly(
Datadog::Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_DATADOG,
Datadog::Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_B3_MULTI_HEADER,
Datadog::Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_B3_SINGLE_HEADER,
Datadog::Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_TRACE_CONTEXT
)
end
Expand Down Expand Up @@ -216,7 +218,9 @@ def propagation_inject_style
it { is_expected.to eq [] }

it 'does not change propagation_extract_style' do
expect { propagation_style }.to_not change { propagation_extract_style }.from(%w[Datadog tracecontext])
expect { propagation_style }.to_not change { propagation_extract_style }.from(
%w[Datadog b3multi b3 tracecontext]
)
end

it 'does not change propagation_inject_style' do
Expand Down

0 comments on commit 8e470dc

Please sign in to comment.