Module: BrainzLab::Instrumentation::GrapeInstrumentation

Defined in:
lib/brainzlab/instrumentation/grape.rb

Defined Under Namespace

Classes: Middleware

Class Method Summary collapse

Class Method Details

.install!Object



9
10
11
12
13
14
15
16
17
18
# File 'lib/brainzlab/instrumentation/grape.rb', line 9

def install!
  return unless defined?(::Grape::API)
  return if @installed

  # Subscribe to Grape's ActiveSupport notifications
  install_notifications!

  @installed = true
  BrainzLab.debug_log('Grape instrumentation installed')
end

.installed?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/brainzlab/instrumentation/grape.rb', line 20

def installed?
  @installed
end

.reset!Object



24
25
26
# File 'lib/brainzlab/instrumentation/grape.rb', line 24

def reset!
  @installed = false
end