Module: SidekiqVigil::Alert::Grouping

Defined in:
lib/sidekiq_vigil/alert/grouping.rb

Class Method Summary collapse

Class Method Details

.apply(events, threshold:, timestamp:, limit: 5) ⇒ Object



8
9
10
11
12
# File 'lib/sidekiq_vigil/alert/grouping.rb', line 8

def apply(events, threshold:, timestamp:, limit: 5)
  return events if events.length <= threshold

  [DigestEvent.new(events:, timestamp:, limit:)]
end