class ThriftRack::Sentry

Public Class Methods

new(app) click to toggle source
# File lib/thrift_rack/sentry.rb, line 3
def initialize(app)
  @app = app
end

Public Instance Methods

call(env) click to toggle source
# 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