Skip to content

Commit

Permalink
Remove deprecated DD_PROPAGATION_STYLE env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
marcotc committed Dec 1, 2023
1 parent cca755f commit aca6574
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 54 deletions.
4 changes: 0 additions & 4 deletions lib/datadog/tracing/configuration/ext.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 0 additions & 5 deletions lib/datadog/tracing/configuration/settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,7 @@ def self.extended(base)
# @return [Array<String>]
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,
Expand All @@ -76,9 +73,7 @@ def self.extended(base)
# @return [Array<String>]
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,
Expand Down
3 changes: 0 additions & 3 deletions sig/datadog/tracing/configuration/ext.rbs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
42 changes: 0 additions & 42 deletions spec/datadog/tracing/configuration/settings_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,27 +96,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
Expand Down Expand Up @@ -149,27 +128,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
Expand Down

0 comments on commit aca6574

Please sign in to comment.