Module: NewRelic::Agent::Instrumentation::Sinatra::Ignorer

Defined in:
lib/new_relic/agent/instrumentation/sinatra/ignorer.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.should_ignore?(app, type) ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
11
12
13
14
# File 'lib/new_relic/agent/instrumentation/sinatra/ignorer.rb', line 8

def self.should_ignore?(app, type)
  return false if !app.settings.respond_to?(:newrelic_ignores)

  app.settings.newrelic_ignores[type].any? do |pattern|
    pattern.match(app.request.path_info)
  end
end

Instance Method Details

#newrelic_ignore(*routes) ⇒ Object



16
17
18
# File 'lib/new_relic/agent/instrumentation/sinatra/ignorer.rb', line 16

def newrelic_ignore(*routes)
  set_newrelic_ignore(:routes, *routes)
end

#newrelic_ignore_apdex(*routes) ⇒ Object



20
21
22
# File 'lib/new_relic/agent/instrumentation/sinatra/ignorer.rb', line 20

def newrelic_ignore_apdex(*routes)
  set_newrelic_ignore(:apdex, *routes)
end

#newrelic_ignore_enduser(*routes) ⇒ Object



24
25
26
# File 'lib/new_relic/agent/instrumentation/sinatra/ignorer.rb', line 24

def newrelic_ignore_enduser(*routes)
  set_newrelic_ignore(:enduser, *routes)
end