Skip to content

Commit

Permalink
Merge pull request #3294 from DataDog/remove-old-b3
Browse files Browse the repository at this point in the history
  • Loading branch information
marcotc committed Dec 5, 2023
2 parents 12beca2 + ed7d516 commit 80c5e47
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 77 deletions.
5 changes: 0 additions & 5 deletions lib/datadog/tracing/configuration/ext.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,7 @@ module Distributed
PROPAGATION_STYLE_DATADOG = 'Datadog'

PROPAGATION_STYLE_B3_MULTI_HEADER = 'b3multi'
# @deprecated Use `b3multi` instead.
PROPAGATION_STYLE_B3 = 'B3'

PROPAGATION_STYLE_B3_SINGLE_HEADER = 'b3'
# @deprecated Use `b3` instead.
PROPAGATION_STYLE_B3_SINGLE_HEADER_OLD = 'B3 single header'

# W3C Trace Context
PROPAGATION_STYLE_TRACE_CONTEXT = 'tracecontext'
Expand Down
43 changes: 0 additions & 43 deletions lib/datadog/tracing/configuration/settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ module Configuration
# @public_api
# rubocop:disable Metrics/AbcSize
# rubocop:disable Metrics/BlockLength
# rubocop:disable Metrics/CyclomaticComplexity
# rubocop:disable Metrics/MethodLength
# rubocop:disable Layout/LineLength
module Settings
Expand Down Expand Up @@ -64,20 +63,6 @@ def self.extended(base)
Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_TRACE_CONTEXT,
]
)
o.after_set do |styles|
# Modernize B3 options
# DEV-2.0: Can be removed with the removal of deprecated B3 constants.
styles.map! do |style|
case style
when Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_B3
Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_B3_MULTI_HEADER
when Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_B3_SINGLE_HEADER_OLD
Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_B3_SINGLE_HEADER
else
style
end
end
end
end

# The data propagation styles the tracer will use to inject distributed tracing propagation
Expand All @@ -96,20 +81,6 @@ def self.extended(base)
Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_DATADOG,
Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_TRACE_CONTEXT,
]
o.after_set do |styles|
# Modernize B3 options
# DEV-2.0: Can be removed with the removal of deprecated B3 constants.
styles.map! do |style|
case style
when Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_B3
Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_B3_MULTI_HEADER
when Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_B3_SINGLE_HEADER_OLD
Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_B3_SINGLE_HEADER
else
style
end
end
end
end

# An ordered list of what data propagation styles the tracer will use to extract distributed tracing propagation
Expand All @@ -127,19 +98,6 @@ def self.extended(base)
o.after_set do |styles|
next if styles.empty?

# Modernize B3 options
# DEV-2.0: Can be removed with the removal of deprecated B3 constants.
styles.map! do |style|
case style
when Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_B3
Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_B3_MULTI_HEADER
when Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_B3_SINGLE_HEADER_OLD
Tracing::Configuration::Ext::Distributed::PROPAGATION_STYLE_B3_SINGLE_HEADER
else
style
end
end

set_option(:propagation_extract_style, styles)
set_option(:propagation_inject_style, styles)
end
Expand Down Expand Up @@ -491,7 +449,6 @@ def self.extended(base)
end
# rubocop:enable Metrics/AbcSize
# rubocop:enable Metrics/BlockLength
# rubocop:enable Metrics/CyclomaticComplexity
# rubocop:enable Metrics/MethodLength
# rubocop:enable Layout/LineLength
end
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 @@ -21,10 +21,7 @@ module Datadog
PROPAGATION_STYLE_DATADOG: "Datadog"

PROPAGATION_STYLE_B3_MULTI_HEADER: "b3multi"
PROPAGATION_STYLE_B3: "B3"

PROPAGATION_STYLE_B3_SINGLE_HEADER: "b3"
PROPAGATION_STYLE_B3_SINGLE_HEADER_OLD: "B3 single header"
PROPAGATION_STYLE_TRACE_CONTEXT: "tracecontext"
ENV_PROPAGATION_STYLE: "DD_TRACE_PROPAGATION_STYLE"

Expand Down
26 changes: 0 additions & 26 deletions spec/datadog/tracing/configuration/settings_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,19 +93,6 @@
)
end
end

context 'is set to deprecated style names' do
let(:var_value) { 'B3,B3 single header' }

it 'translates to new names' do
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

context 'with deprecated DD_PROPAGATION_STYLE_EXTRACT' do
Expand Down Expand Up @@ -159,19 +146,6 @@
)
end
end

context 'is set to deprecated style names' do
let(:var_value) { 'B3,B3 single header' }

it 'translates to new names' do
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

context 'with deprecated DD_PROPAGATION_STYLE_INJECT' do
Expand Down

0 comments on commit 80c5e47

Please sign in to comment.