Class: ElasticAPM::OpenTracing::Scope Private
- Inherits:
-
Object
- Object
- ElasticAPM::OpenTracing::Scope
- Defined in:
- lib/elastic_apm/opentracing.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Instance Attribute Summary collapse
- #span ⇒ Object readonly private
Instance Method Summary collapse
- #close ⇒ Object private
- #elastic_span ⇒ Object private
-
#initialize(span, scope_stack, finish_on_close:) ⇒ Scope
constructor
private
A new instance of Scope.
Constructor Details
#initialize(span, scope_stack, finish_on_close:) ⇒ Scope
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Scope.
153 154 155 156 157 |
# File 'lib/elastic_apm/opentracing.rb', line 153 def initialize(span, scope_stack, finish_on_close:) @span = span @scope_stack = scope_stack @finish_on_close = finish_on_close end |
Instance Attribute Details
#span ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
159 160 161 |
# File 'lib/elastic_apm/opentracing.rb', line 159 def span @span end |
Instance Method Details
#close ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
165 166 167 168 |
# File 'lib/elastic_apm/opentracing.rb', line 165 def close @span.finish if @finish_on_close @scope_stack.pop end |
#elastic_span ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
161 162 163 |
# File 'lib/elastic_apm/opentracing.rb', line 161 def elastic_span span.elastic_span end |