Sha256: a89f5054552c1ac62d96b0c2340c1804f24464de8aca8892948e1a07389d5535
Contents?: true
Size: 892 Bytes
Versions: 33
Compression:
Stored size: 892 Bytes
Contents
require 'rollbar/truncation/mixin' require 'rollbar/util' module Rollbar module Truncation class MinBodyStrategy include ::Rollbar::Truncation::Mixin def self.call(payload) new.call(payload) end def call(payload) body = payload['data']['body'] if body['trace_chain'] body['trace_chain'] = body['trace_chain'].map do |trace_data| truncate_trace_data(trace_data) end elsif body['trace'] body['trace'] = truncate_trace_data(body['trace']) end dump(payload) end def truncate_trace_data(trace_data) trace_data['exception'].delete('description') trace_data['exception']['message'] = trace_data['exception']['message'][0, 255] trace_data['frames'] = select_frames(trace_data['frames'], 1) trace_data end end end end
Version data entries
33 entries across 33 versions & 1 rubygems