Sha256: 20640447cf1daf7a51f7315d54ab9902755793caa20ee802634522cf8703b3ee
Contents?: true
Size: 723 Bytes
Versions: 1
Compression:
Stored size: 723 Bytes
Contents
class LHC::Rollbar < LHC::Interceptor include ActiveSupport::Configurable def after_response(response) return unless Object.const_defined?('Rollbar') request = response.request additional_params = request.options.fetch(:rollbar, {}) error = LHC::Error.find(response) data = { response: { body: response.body, code: response.code, headers: response.headers, time: response.time, timeout?: response.timeout? }, request: { url: request.url, method: request.method, headers: request.headers, params: request.params } }.merge additional_params Rollbar.error( error, data ) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
lhc-core-interceptors-2.3.1 | lib/lhc-core-interceptors/rollbar.rb |