Class: LogBrew::TelemetryScope
- Inherits:
-
Object
- Object
- LogBrew::TelemetryScope
- Defined in:
- lib/logbrew/telemetry.rb
Overview
Idempotent owner for one active shared-context scope.
Instance Method Summary collapse
- #close ⇒ Object
-
#initialize(activation_id) ⇒ TelemetryScope
constructor
A new instance of TelemetryScope.
Constructor Details
#initialize(activation_id) ⇒ TelemetryScope
Returns a new instance of TelemetryScope.
6 7 8 9 |
# File 'lib/logbrew/telemetry.rb', line 6 def initialize(activation_id) @activation_id = activation_id @closed = false end |
Instance Method Details
#close ⇒ Object
11 12 13 14 15 16 |
# File 'lib/logbrew/telemetry.rb', line 11 def close return if @closed Telemetry.close_scope(@activation_id) @closed = true end |