Class: NewRelic::Agent::Instrumentation::Webmachine::NewRelicRequest

Inherits:
Object
  • Object
show all
Defined in:
lib/new_relic/webmachine/instrument.rb

Overview

Encapsulates what New Relic wants to know about requests. This is necessary because we can’t (easily) get a Rack::Request.

Instance Method Summary collapse

Constructor Details

#initialize(wm_request) ⇒ NewRelicRequest

Returns a new instance of NewRelicRequest.



46
47
48
# File 'lib/new_relic/webmachine/instrument.rb', line 46

def initialize(wm_request)
  @wm_request = wm_request
end

Instance Method Details

#cookiesObject



58
59
60
# File 'lib/new_relic/webmachine/instrument.rb', line 58

def cookies
  @wm_request.cookies
end

#refererObject



54
55
56
# File 'lib/new_relic/webmachine/instrument.rb', line 54

def referer
  @wm_request["HTTP_REFERER"]
end

#uriObject



50
51
52
# File 'lib/new_relic/webmachine/instrument.rb', line 50

def uri
  @wm_request.uri.to_s
end