Skip to content

Commit

Permalink
Update warnings shown when new profiler is enabled in preparation for…
Browse files Browse the repository at this point in the history
… beta
  • Loading branch information
ivoanjo committed Dec 13, 2022
1 parent 3413c8a commit 91cc4c5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions lib/datadog/core/configuration/components.rb
Original file line number Diff line number Diff line change
Expand Up @@ -351,16 +351,18 @@ def should_enable_gc_profiling?(settings)
def print_new_profiler_warnings
if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.6')
Datadog.logger.warn(
'New Ruby profiler has been force-enabled. This feature is in alpha state. Please report any issues ' \
'you run into via <https://github.com/datadog/dd-trace-rb/issues/new>!'
'New Ruby profiler has been force-enabled. This feature is in beta state. We do not yet recommend ' \
'running it in production environments. Please report any issues ' \
'you run into to Datadog support or via <https://github.com/datadog/dd-trace-rb/issues/new>!'
)
else
# For more details on the issue, see the "BIG Issue" comment on `gvl_owner` function in
# `private_vm_api_access.c`.
Datadog.logger.warn(
'New Ruby profiler has been force-enabled on a legacy Ruby version (< 2.6). This is not recommended in ' \
'production environments, as due to limitations in Ruby APIs, we suspect it may lead to crashes in very ' \
'rare situations. Please report any issues you run into via <https://github.com/datadog/dd-trace-rb/issues/new>!'
'rare situations. Please report any issues you run into to Datadog support or ' \
'via <https://github.com/datadog/dd-trace-rb/issues/new>!'
)
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/datadog/core/configuration/components_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,7 @@

it 'logs a warning message mentioning that profiler has been force-enabled' do
expect(Datadog.logger).to receive(:warn).with(
/New Ruby profiler has been force-enabled. This feature is in alpha state/
/New Ruby profiler has been force-enabled. This feature is in beta state/
)

build_profiler
Expand Down

0 comments on commit 91cc4c5

Please sign in to comment.