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 support for disable_transaction_tracing #1792

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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
- Rainbows
- Sunspot

- **Dropped method: `NewRelic::Agent.disable_transaction_tracing`**

The previously deprecated `NewRelic::Agent.disable_transaction_tracing` method has been removed. Users are encouraged to use `NewRelic::Agent.disable_all_tracing` or `NewRelic::Agent.ignore_transaction`.

## 8.16.0

Version 8.16.0 introduces more Ruby on Rails instrumentation (especially for Rails 6 and 7) for various Action\*/Active\* libraries whose actions produce [Active Support notifications events](https://guides.rubyonrails.org/active_support_instrumentation.html).
Expand Down
12 changes: 0 additions & 12 deletions lib/new_relic/agent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -511,18 +511,6 @@ def disable_all_tracing
end
end

# This method disables the recording of transaction traces in the given
# block. See also #disable_all_tracing
#
# @api public
#
def disable_transaction_tracing
Deprecator.deprecate(:disable_transaction_tracing,
'disable_all_tracing or ignore_transaction')
record_api_supportability_metric(:disable_transaction_tracing)
yield
end

# This method sets the state of sql recording in the transaction
# sampler feature. Within the given block, no sql will be recorded
#
Expand Down
1 change: 0 additions & 1 deletion lib/new_relic/supportability_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ module SupportabilityHelper
:browser_timing_header,
:disable_all_tracing,
:disable_sql_recording,
:disable_transaction_tracing,
:drop_buffered_data,
:get_request_metadata,
:get_response_metadata,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@
NewRelic::Agent.disable_all_tracing do
end

NewRelic::Agent.disable_transaction_tracing do
end

NewRelic::Agent.disable_sql_recording do
end

Expand Down
6 changes: 0 additions & 6 deletions test/new_relic/agent/supportability_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,6 @@ def test_disable_sql_recording_records_supportability_metric
assert_api_supportability_metric_recorded(:disable_sql_recording)
end

def test_disable_transaction_tracing_records_supportability_metric
NewRelic::Agent.disable_transaction_tracing {}

assert_api_supportability_metric_recorded(:disable_transaction_tracing)
end

def test_ignore_apdex_records_supportability_metric
NewRelic::Agent.ignore_apdex

Expand Down
13 changes: 0 additions & 13 deletions test/new_relic/agent_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -464,19 +464,6 @@ def test_notice_error_returns_nil
end
end

def test_disable_transaction_tracing_deprecated
log = with_array_logger(:warn) do
NewRelic::Agent.disable_transaction_tracing do
in_transaction do |txn|
# no-op
end
end
end

assert log.array.any? { |msg| msg.include?('The method disable_transaction_tracing is deprecated.') }
assert log.array.any? { |msg| msg.include?('Please use disable_all_tracing or ignore_transaction instead.') }
end

def test_eventing_helpers
called = false
NewRelic::Agent.subscribe(:boo) { called = true }
Expand Down