Sha256: 20180255cd86ff71fdc02cc53996372c9a54d762195d91fc86a0e23cdbe81e7f

Contents?: true

Size: 381 Bytes

Versions: 27

Compression:

Stored size: 381 Bytes

Contents

module Rollbar
  module Truncation
    module Mixin
      def dump(payload)
        Rollbar::JSON.dump(payload)
      end

      def truncate?(result)
        result.bytesize > MAX_PAYLOAD_SIZE
      end

      def select_frames(frames, range = 50)
        return frames unless frames.count > range * 2

        frames[0, range] + frames[-range, range]
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
rollbar-3.6.0 lib/rollbar/truncation/mixin.rb
rollbar-3.5.2 lib/rollbar/truncation/mixin.rb
rollbar-3.5.1 lib/rollbar/truncation/mixin.rb
rollbar-3.5.0 lib/rollbar/truncation/mixin.rb
rollbar-3.4.2 lib/rollbar/truncation/mixin.rb
rollbar-3.4.1 lib/rollbar/truncation/mixin.rb
rollbar-3.4.0 lib/rollbar/truncation/mixin.rb
rollbar-3.3.3 lib/rollbar/truncation/mixin.rb
rollbar-3.3.2 lib/rollbar/truncation/mixin.rb
rollbar-3.3.1 lib/rollbar/truncation/mixin.rb
rollbar-3.3.0 lib/rollbar/truncation/mixin.rb
rollbar-3.2.0 lib/rollbar/truncation/mixin.rb
rollbar-3.1.2 lib/rollbar/truncation/mixin.rb
rollbar-3.1.1 lib/rollbar/truncation/mixin.rb
rollbar-3.1.0 lib/rollbar/truncation/mixin.rb
rollbar-3.0.1 lib/rollbar/truncation/mixin.rb
rollbar-3.0.0 lib/rollbar/truncation/mixin.rb
rollbar-2.27.1 lib/rollbar/truncation/mixin.rb
rollbar-2.27.0 lib/rollbar/truncation/mixin.rb
rollbar-2.26.1 lib/rollbar/truncation/mixin.rb