Module: Rollbar::Truncation
- Extended by:
- Mixin
- Defined in:
- lib/rollbar/truncation.rb,
lib/rollbar/truncation/mixin.rb,
lib/rollbar/truncation/raw_strategy.rb,
lib/rollbar/truncation/frames_strategy.rb,
lib/rollbar/truncation/strings_strategy.rb,
lib/rollbar/truncation/min_body_strategy.rb
Defined Under Namespace
Modules: Mixin Classes: FramesStrategy, MinBodyStrategy, RawStrategy, StringsStrategy
Constant Summary collapse
- MAX_PAYLOAD_SIZE =
512kb
512 * 1024
- STRATEGIES =
[RawStrategy, FramesStrategy, StringsStrategy, MinBodyStrategy]
Class Method Summary collapse
Methods included from Mixin
dump, select_frames, truncate?
Class Method Details
.truncate(payload) ⇒ Object
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/rollbar/truncation.rb', line 18 def self.truncate(payload) result = nil STRATEGIES.each do |strategy| result = strategy.call(payload) break unless truncate?(result) end result end |