Skip to content

Commit

Permalink
Fix check group ids
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewvc committed Aug 31, 2023
1 parent ed5ba55 commit 43b2441
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions heartbeat/monitors/wrappers/summarizer/summarizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func (s *Summarizer) Wrap(j jobs.Job) jobs.Job {
return func(event *beat.Event) ([]jobs.Job, error) {
conts, jobErr := j(event)

_, _ = event.PutValue("monitor.check_group", s.checkGroup)
_, _ = event.PutValue("monitor.check_group", fmt.Sprintf("%s-%d", s.checkGroup, s.jobSummary.Attempt))

s.mtx.Lock()
defer s.mtx.Unlock()
Expand Down Expand Up @@ -140,7 +140,6 @@ func (s *Summarizer) Wrap(j jobs.Job) jobs.Job {
// We preserve `s` across attempts
s.jobSummary = NewJobSummary(js.Attempt+1, js.MaxAttempts, js.RetryGroup)
s.contsRemaining = 1
s.checkGroup = fmt.Sprintf("%s-%d", s.checkGroup, s.jobSummary.Attempt)

// Delay retries by 1s for two reasons:
// 1. Since ES timestamps are millisecond resolution they can happen so fast
Expand Down

0 comments on commit 43b2441

Please sign in to comment.