Class: Sleuth::OutboundHeader
- Inherits:
-
Object
- Object
- Sleuth::OutboundHeader
- Defined in:
- lib/sleuth/outbound_handler.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ OutboundHeader
constructor
A new instance of OutboundHeader.
Constructor Details
#initialize(app) ⇒ OutboundHeader
Returns a new instance of OutboundHeader.
3 4 5 |
# File 'lib/sleuth/outbound_handler.rb', line 3 def initialize(app) @app = app end |
Instance Method Details
#call(env) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'lib/sleuth/outbound_handler.rb', line 7 def call(env) request = Rack::Request.new(env) Sleuth.instrument("Sending #{request.request_method} #{request.url}") do if Sleuth.inside_transaction? env["HTTP_#{TRANSACTION_HEADER}"] = Sleuth.current_transaction.full_name end @app.call(env) end end |