From ba8ec9d022faf11280155d346865070ed5103b9a Mon Sep 17 00:00:00 2001 From: Tanna McClure Date: Fri, 5 Jan 2024 16:43:58 -0800 Subject: [PATCH] Update lib/new_relic/agent/tracer.rb Co-authored-by: James Bunch --- lib/new_relic/agent/tracer.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/new_relic/agent/tracer.rb b/lib/new_relic/agent/tracer.rb index 6bfd9a90b6..de94b3409f 100644 --- a/lib/new_relic/agent/tracer.rb +++ b/lib/new_relic/agent/tracer.rb @@ -427,7 +427,7 @@ def thread_block_with_current_transaction(segment_name: nil, parent: nil, &block NewRelic::Agent::Tracer.state.current_transaction = current_txn ::Thread.current[:newrelic_thread_span_parent] = parent current_txn.async = true - segment_name = segment_name.to_s + "/Thread#{::Thread.current.object_id}/Fiber#{::Fiber.current.object_id}" if NewRelic::Agent.config[:'thread_ids_enabled'] + segment_name = "#{segment_name}/Thread#{::Thread.current.object_id}/Fiber#{::Fiber.current.object_id}" if NewRelic::Agent.config[:'thread_ids_enabled'] segment = NewRelic::Agent::Tracer.start_segment(name: segment_name, parent: parent) if segment_name end NewRelic::Agent::Tracer.capture_segment_error(segment) do