Class: ThriftRack::Sentry
- Inherits:
-
Object
- Object
- ThriftRack::Sentry
- Defined in:
- lib/thrift_rack/sentry.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ Sentry
constructor
A new instance of Sentry.
Constructor Details
#initialize(app) ⇒ Sentry
Returns a new instance of Sentry.
3 4 5 |
# File 'lib/thrift_rack/sentry.rb', line 3 def initialize(app) @app = app end |
Instance Method Details
#call(env) ⇒ Object
7 8 9 10 11 |
# File 'lib/thrift_rack/sentry.rb', line 7 def call(env) req = Rack::Request.new(env) Raven.extra_context(request_id: req.env["HTTP_X_REQUEST_ID"], rpc_id: req.env["HTTP_X_RPC_ID"], from: req.env["HTTP_X_FROM"]) @app.call(env) end |