From 9ef235465dcbfb2e82c69abfd50f8e0fb2f2754f Mon Sep 17 00:00:00 2001 From: Marco Costa Date: Thu, 30 Nov 2023 16:15:50 -0800 Subject: [PATCH] Remove deprecated DD_PROPAGATION_STYLE env vars --- lib/datadog/tracing/configuration/ext.rb | 4 -- lib/datadog/tracing/configuration/settings.rb | 5 --- sig/datadog/tracing/configuration/ext.rbs | 3 -- .../tracing/configuration/settings_spec.rb | 42 ------------------- 4 files changed, 54 deletions(-) diff --git a/lib/datadog/tracing/configuration/ext.rb b/lib/datadog/tracing/configuration/ext.rb index 05ee5c698ee..68bed3ed546 100644 --- a/lib/datadog/tracing/configuration/ext.rb +++ b/lib/datadog/tracing/configuration/ext.rb @@ -46,12 +46,8 @@ module Distributed ENV_PROPAGATION_STYLE = 'DD_TRACE_PROPAGATION_STYLE' ENV_PROPAGATION_STYLE_INJECT = 'DD_TRACE_PROPAGATION_STYLE_INJECT' - # @deprecated Use `DD_TRACE_PROPAGATION_STYLE_INJECT` instead. - ENV_PROPAGATION_STYLE_INJECT_OLD = 'DD_PROPAGATION_STYLE_INJECT' ENV_PROPAGATION_STYLE_EXTRACT = 'DD_TRACE_PROPAGATION_STYLE_EXTRACT' - # @deprecated Use `DD_TRACE_PROPAGATION_STYLE_EXTRACT` instead. - ENV_PROPAGATION_STYLE_EXTRACT_OLD = 'DD_PROPAGATION_STYLE_EXTRACT' # A no-op propagator. Compatible with OpenTelemetry's `none` propagator. # @see https://opentelemetry.io/docs/concepts/sdk-configuration/general-sdk-configuration/#get_otel__propagators diff --git a/lib/datadog/tracing/configuration/settings.rb b/lib/datadog/tracing/configuration/settings.rb index f745a812027..e7727c6288d 100644 --- a/lib/datadog/tracing/configuration/settings.rb +++ b/lib/datadog/tracing/configuration/settings.rb @@ -53,10 +53,7 @@ def self.extended(base) # @return [Array] option :propagation_extract_style do |o| o.type :array - o.deprecated_env Tracing::Configuration::Ext::Distributed::ENV_PROPAGATION_STYLE_EXTRACT_OLD o.env Tracing::Configuration::Ext::Distributed::ENV_PROPAGATION_STYLE_EXTRACT - # DEV-2.0: Change default value to `tracecontext, Datadog`. - # Look for all headers by default o.default( [ Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_DATADOG, @@ -74,9 +71,7 @@ def self.extended(base) # @return [Array] option :propagation_inject_style do |o| o.type :array - o.deprecated_env Tracing::Configuration::Ext::Distributed::ENV_PROPAGATION_STYLE_INJECT_OLD o.env Tracing::Configuration::Ext::Distributed::ENV_PROPAGATION_STYLE_INJECT - # DEV-2.0: Change default value to `tracecontext, Datadog`. o.default [ Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_DATADOG, Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_TRACE_CONTEXT, diff --git a/sig/datadog/tracing/configuration/ext.rbs b/sig/datadog/tracing/configuration/ext.rbs index 512e87217e0..01c18cd981f 100644 --- a/sig/datadog/tracing/configuration/ext.rbs +++ b/sig/datadog/tracing/configuration/ext.rbs @@ -26,10 +26,7 @@ module Datadog ENV_PROPAGATION_STYLE: "DD_TRACE_PROPAGATION_STYLE" ENV_PROPAGATION_STYLE_INJECT: "DD_TRACE_PROPAGATION_STYLE_INJECT" - ENV_PROPAGATION_STYLE_INJECT_OLD: "DD_PROPAGATION_STYLE_INJECT" - ENV_PROPAGATION_STYLE_EXTRACT: "DD_TRACE_PROPAGATION_STYLE_EXTRACT" - ENV_PROPAGATION_STYLE_EXTRACT_OLD: "DD_PROPAGATION_STYLE_EXTRACT" PROPAGATION_STYLE_NONE: "none" ENV_X_DATADOG_TAGS_MAX_LENGTH: "DD_TRACE_X_DATADOG_TAGS_MAX_LENGTH" diff --git a/spec/datadog/tracing/configuration/settings_spec.rb b/spec/datadog/tracing/configuration/settings_spec.rb index 7c42b87dc1b..f0166abf5f1 100644 --- a/spec/datadog/tracing/configuration/settings_spec.rb +++ b/spec/datadog/tracing/configuration/settings_spec.rb @@ -94,27 +94,6 @@ end end end - - context 'with deprecated DD_PROPAGATION_STYLE_EXTRACT' do - let(:var_name) { 'DD_PROPAGATION_STYLE_EXTRACT' } - - context 'is defined' do - let(:var_value) { 'b3multi,b3' } - - it do - expect(::Datadog::Core).to receive(:log_deprecation).with(no_args) do |&message_block| - expect(message_block.call).to match('DD_PROPAGATION_STYLE_EXTRACT environment variable is deprecated') - end - - is_expected.to eq( - [ - Datadog::Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_B3_MULTI_HEADER, - Datadog::Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_B3_SINGLE_HEADER - ] - ) - end - end - end end describe '#propagation_inject_style' do @@ -147,27 +126,6 @@ end end end - - context 'with deprecated DD_PROPAGATION_STYLE_INJECT' do - let(:var_name) { 'DD_PROPAGATION_STYLE_INJECT' } - - context 'is defined' do - let(:var_value) { 'Datadog,b3' } - - it do - expect(::Datadog::Core).to receive(:log_deprecation).with(no_args) do |&message_block| - expect(message_block.call).to match('DD_PROPAGATION_STYLE_INJECT environment variable is deprecated') - end - - is_expected.to eq( - [ - Datadog::Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_DATADOG, - Datadog::Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_B3_SINGLE_HEADER - ] - ) - end - end - end end describe '#propagation_style' do