Method: Jaeger::Client::Tracer#active_span

Defined in:
lib/jaeger/client/tracer.rb

#active_spanSpan?

Returns the active span. This is a shorthand for ‘scope_manager.active.span`, and nil will be returned if Scope#active is nil.

Returns:

  • (Span, nil)

    the active span. This is a shorthand for ‘scope_manager.active.span`, and nil will be returned if Scope#active is nil.



21
22
23
24
# File 'lib/jaeger/client/tracer.rb', line 21

def active_span
  scope = scope_manager.active
  scope.span if scope
end