Class: LogBrew::TelemetryScope

Inherits:
Object
  • Object
show all
Defined in:
lib/logbrew/telemetry.rb

Overview

Idempotent owner for one active shared-context scope.

Instance Method Summary collapse

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

#closeObject



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