Class: Esse::Rails::Instrumentation::RuntimeRegistry

Inherits:
Object
  • Object
show all
Defined in:
lib/esse/rails/instrumentation/runtime_registry.rb

Overview

A log subscriber to attach to Elastic/Open Search related events

Class Method Summary collapse

Class Method Details

.resetObject



19
20
21
22
# File 'lib/esse/rails/instrumentation/runtime_registry.rb', line 19

def self.reset
  rt, self.runtime = runtime, 0
  rt
end

.runtimeObject



15
16
17
# File 'lib/esse/rails/instrumentation/runtime_registry.rb', line 15

def self.runtime
  Thread.current["esse_runtime"] ||= 0
end

.runtime=(value) ⇒ Object



11
12
13
# File 'lib/esse/rails/instrumentation/runtime_registry.rb', line 11

def self.runtime=(value)
  Thread.current["esse_runtime"] = value
end