Class: Labkit::Tracing::Adapters::OpentelemetryTracer::OpenTelemetryScope Private
- Inherits:
-
Object
- Object
- Labkit::Tracing::Adapters::OpentelemetryTracer::OpenTelemetryScope
- Defined in:
- lib/labkit/tracing/adapters/opentelemetry_tracer.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
-
#initialize(raw_span, token) ⇒ OpenTelemetryScope
constructor
private
A new instance of OpenTelemetryScope.
Constructor Details
#initialize(raw_span, token) ⇒ OpenTelemetryScope
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 OpenTelemetryScope.
88 89 90 91 92 |
# File 'lib/labkit/tracing/adapters/opentelemetry_tracer.rb', line 88 def initialize(raw_span, token) @span = OpentelemetrySpan.new(raw_span) @raw_span = raw_span @token = token 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.
86 87 88 |
# File 'lib/labkit/tracing/adapters/opentelemetry_tracer.rb', line 86 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.
94 95 96 97 |
# File 'lib/labkit/tracing/adapters/opentelemetry_tracer.rb', line 94 def close @raw_span.finish OpenTelemetry::Context.detach(@token) end |