Class: Instana::Activators::Roda

Inherits:
Instana::Activator show all
Defined in:
lib/instana/activators/roda.rb

Instance Method Summary collapse

Methods inherited from Instana::Activator

#call, call, inherited, start

Instance Method Details

#can_instrument?Boolean

Returns:

  • (Boolean)


7
8
9
# File 'lib/instana/activators/roda.rb', line 7

def can_instrument?
  defined?(::Instana::Rack) && defined?(::Roda)
end

#instrumentObject



11
12
13
14
15
16
17
18
# File 'lib/instana/activators/roda.rb', line 11

def instrument
  require 'instana/frameworks/roda'

  ::Roda.use ::Instana::Rack
  ::Roda.plugin ::Instana::RodaPathTemplateExtractor

  true
end