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)


11
12
13
14
15
16
17
# File 'lib/new_relic/agent/instrumentation/sinatra/ignorer.rb', line 11

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



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

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

#newrelic_ignore_apdex(*routes) ⇒ Object



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

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

#newrelic_ignore_enduser(*routes) ⇒ Object



27
28
29
# File 'lib/new_relic/agent/instrumentation/sinatra/ignorer.rb', line 27

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