From a08db1a3fe9c26547150fb507ea7ffc0b3c14f74 Mon Sep 17 00:00:00 2001 From: Tony Hsu Date: Mon, 20 Nov 2023 21:33:55 +0100 Subject: [PATCH] Add b3 default extraction --- lib/datadog/tracing/configuration/settings.rb | 2 ++ spec/datadog/tracing/configuration/settings_spec.rb | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/datadog/tracing/configuration/settings.rb b/lib/datadog/tracing/configuration/settings.rb index 602396be55e..4ee180b9328 100644 --- a/lib/datadog/tracing/configuration/settings.rb +++ b/lib/datadog/tracing/configuration/settings.rb @@ -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, ] ) diff --git a/spec/datadog/tracing/configuration/settings_spec.rb b/spec/datadog/tracing/configuration/settings_spec.rb index 61e656fda54..f3dd1ebc5ef 100644 --- a/spec/datadog/tracing/configuration/settings_spec.rb +++ b/spec/datadog/tracing/configuration/settings_spec.rb @@ -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 @@ -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