Class: OpenTracing::ScopeManager
- Inherits:
-
Object
- Object
- OpenTracing::ScopeManager
- Defined in:
- lib/opentracing/scope_manager.rb
Overview
ScopeManager represents an OpenTracing ScopeManager
See www.opentracing.io for more information.
The ScopeManager interface abstracts both the activation of Span instances via ScopeManager#activate and access to an active Span/Scope via ScopeManager#active
Constant Summary collapse
- NOOP_INSTANCE =
ScopeManager.new.freeze
Instance Method Summary collapse
-
#activate(span, finish_on_close: true) ⇒ Scope
Make a span instance active.
-
#active ⇒ Scope
currently active Span.
Instance Method Details
#activate(span, finish_on_close: true) ⇒ Scope
Make a span instance active.
21 22 23 |
# File 'lib/opentracing/scope_manager.rb', line 21 def activate(span, finish_on_close: true) Scope::NOOP_INSTANCE end |
#active ⇒ Scope
currently active Span.
If there is a non-null Scope, its wrapped Span becomes an implicit parent (as Reference#CHILD_OF) of any newly-created Span at Tracer#start_active_span or Tracer#start_span time.
31 32 33 |
# File 'lib/opentracing/scope_manager.rb', line 31 def active Scope::NOOP_INSTANCE end |