Skip to content

Commit 9807c5d

Browse files
committed
Fix: breaking application logic because the supe call was being made
1. If tracer was disabled or if the agent was not ready the checks would return false and the methoud would return without calling the super class in_span This overriden in_span method can be safly removed as the same checks are in place (inside start_span) Closes 478 Signed-off-by: Arjun Rajappa <Arjun.Rajappa@ibm.com>
1 parent ef36f94 commit 9807c5d

1 file changed

Lines changed: 0 additions & 21 deletions

File tree

lib/instana/trace/tracer.rb

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -307,27 +307,6 @@ def clear!
307307
self.current_span = nil
308308
end
309309

310-
# Creates a span that is active during the execution of the provided block.
311-
# The span is automatically closed when the block completes, whether it completes
312-
# normally or with an exception.
313-
#
314-
# @param name [String, Symbol] the name of the span to create
315-
# @param attributes [Hash, nil] optional attributes to set on the span
316-
# @param links [Array<Link>, nil] optional links to associate with the span
317-
# @param start_timestamp [Integer, nil] optional start time for the span in milliseconds
318-
# @param kind [Symbol, nil] optional span kind (e.g., :internal, :client, :server)
319-
#
320-
# @return [Object] the return value of the block
321-
#
322-
# @note This method is a wrapper around the parent class implementation and
323-
# will only create a span if the Instana agent is ready and tracing is enabled.
324-
#
325-
def in_span(name, attributes: nil, links: nil, start_timestamp: nil, kind: nil)
326-
return if !::Instana.agent.ready? || !::Instana.config[:tracing][:enabled]
327-
328-
super
329-
end
330-
331310
# Starts a new span with the given parameters.
332311
#
333312
# @param name [String, Symbol] the name of the span to create (defaults to 'empty' if nil)

0 commit comments

Comments
 (0)