Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove deprecated profiler config options #3309

Merged
merged 1 commit into from
Dec 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading