Update private API calls to public Tracer API

Problem

In New Relic Ruby agent version 6.0.0, a number of APIs that were not publicly supported were deprecated or deleted. If you use any of the deleted methods, you must update your API with the recommended replacement before upgrading to Ruby agent version 6.0.0 or higher. If you use any of the deprecated methods, we recommend updating your API as soon as possible to ensure compatibility with versions of the agent higher than 6.0.0.

Solution

Update your API with the following recommended replacements:

External.start_segment

Replace with NewRelic::Agent::Tracer.start_external_request_segment

Transaction.create_segment

Replace with NewRelic::Agent::Tracer.start_segment

Transaction.start

Replace with NewRelic::Agent::Tracer.start_transaction_or_segment

Transaction.start_datastore_segment

Replace with NewRelic::Agent::Tracer.start_datastore_segment

Transaction.start_segment

Replace with NewRelic::Agent::Tracer.start_segment

Transaction.wrap

Replace with NewRelic::Agent::Tracer.in_transaction

TransactionState.current_transaction

Replace with NewRelic::Agent::Tracer.current_transaction

For more help

Recommendations for learning more: