Sha256: f4bc6701f9f9d2c2fa659a5068678520bc7e4c56c50d9076452865a701427aeb
Contents?: true
Size: 860 Bytes
Versions: 11
Compression:
Stored size: 860 Bytes
Contents
require 'rollbar/util' module Rollbar module Truncation class RemoveExtraStrategy include ::Rollbar::Truncation::Mixin def self.call(payload) new.call(payload) end def call(payload) body = payload['data']['body'] delete_message_extra(body) delete_trace_chain_extra(body) delete_trace_extra(body) dump(payload) end def delete_message_extra(body) body['message'].delete('extra') if body['message'] && body['message']['extra'] end def delete_trace_chain_extra(body) return unless body['trace_chain'] && body['trace_chain'][0]['extra'] body['trace_chain'][0].delete('extra') end def delete_trace_extra(body) body['trace'].delete('extra') if body['trace'] && body['trace']['extra'] end end end end
Version data entries
11 entries across 11 versions & 1 rubygems