Skip to content

Commit

Permalink
remove deprecated profiler config options that were already noops (#3309
Browse files Browse the repository at this point in the history
)
  • Loading branch information
ekump authored Dec 7, 2023
1 parent cfc5ab3 commit e7bfaa7
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 84 deletions.
52 changes: 0 additions & 52 deletions lib/datadog/core/configuration/settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -207,19 +207,6 @@ def initialize(*_)

# @public_api
settings :advanced do
# @deprecated No longer does anything, and will be removed on dd-trace-rb 2.0.
#
# This was used prior to the GA of the new CPU Profiling 2.0 profiler. The CPU Profiling 2.0 profiler does not
# use or need this setting and thus it doesn't do anything.
option :max_events do |o|
o.after_set do
Datadog.logger.warn(
'The profiling.advanced.max_events setting has been deprecated for removal and no ' \
'longer does anything. Please remove it from your Datadog.configure block.'
)
end
end

# Controls the maximum number of frames for each thread sampled. Can be tuned to avoid omitted frames in the
# produced profiles. Increasing this may increase the overhead of profiling.
#
Expand Down Expand Up @@ -250,45 +237,6 @@ def initialize(*_)
# grouping and categorization of stack traces.
option :code_provenance_enabled, default: true

# @deprecated No longer does anything, and will be removed on dd-trace-rb 2.0.
#
# This was added as a temporary support option in case of issues with the new `Profiling::HttpTransport` class
# but we're now confident it's working nicely so we've removed the old code path.
option :legacy_transport_enabled do |o|
o.after_set do
Datadog.logger.warn(
'The profiling.advanced.legacy_transport_enabled setting has been deprecated for removal and no ' \
'longer does anything. Please remove it from your Datadog.configure block.'
)
end
end

# @deprecated No longer does anything, and will be removed on dd-trace-rb 2.0.
#
# This was used prior to the GA of the new CPU Profiling 2.0 profiler. Using CPU Profiling 2.0 is now the
# default and this doesn't do anything.
option :force_enable_new_profiler do |o|
o.after_set do
Datadog.logger.warn(
'The profiling.advanced.force_enable_new_profiler setting has been deprecated for removal and no ' \
'longer does anything. Please remove it from your Datadog.configure block.'
)
end
end

# @deprecated No longer does anything, and will be removed on dd-trace-rb 2.0.
#
# This was used prior to the GA of the new CPU Profiling 2.0 profiler. Using CPU Profiling 2.0 is now the
# default and this doesn't do anything.
option :force_enable_legacy_profiler do |o|
o.after_set do
Datadog.logger.warn(
'The profiling.advanced.force_enable_legacy_profiler setting has been deprecated for removal and no ' \
'longer does anything. Please remove it from your Datadog.configure block.'
)
end
end

# Forces enabling of profiling of time/resources spent in Garbage Collection.
#
# Note that setting this to "false" (or not setting it) will not prevent the feature from being
Expand Down
32 changes: 0 additions & 32 deletions spec/datadog/core/configuration/settings_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -343,14 +343,6 @@
end

describe '#advanced' do
describe '#max_events=' do
it 'logs a warning informing customers this no longer does anything' do
expect(Datadog.logger).to receive(:warn).with(/no longer does anything/)

settings.profiling.advanced.max_events = 1234
end
end

describe '#max_frames' do
subject(:max_frames) { settings.profiling.advanced.max_frames }

Expand Down Expand Up @@ -438,30 +430,6 @@
end
end

describe '#force_enable_new_profiler=' do
it 'logs a warning informing customers this no longer does anything' do
expect(Datadog.logger).to receive(:warn).with(/no longer does anything/)

settings.profiling.advanced.force_enable_new_profiler = true
end
end

describe '#legacy_transport_enabled=' do
it 'logs a warning informing customers this no longer does anything' do
expect(Datadog.logger).to receive(:warn).with(/no longer does anything/)

settings.profiling.advanced.legacy_transport_enabled = true
end
end

describe '#force_enable_legacy_profiler=' do
it 'logs a warning informing customers this no longer does anything' do
expect(Datadog.logger).to receive(:warn).with(/no longer does anything/)

settings.profiling.advanced.force_enable_legacy_profiler = true
end
end

describe '#force_enable_gc_profiling' do
subject(:force_enable_gc_profiling) { settings.profiling.advanced.force_enable_gc_profiling }

Expand Down

0 comments on commit e7bfaa7

Please sign in to comment.