Skip to content

Commit

Permalink
[Heartbeat] Fix zip monitors by changing the check group after summar…
Browse files Browse the repository at this point in the history
…y docs

Fixes elastic#33698
  • Loading branch information
andrewvc committed Nov 18, 2022
1 parent 467b915 commit efce225
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions x-pack/heartbeat/monitors/browser/synthexec/enrich.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,11 @@ func (je *journeyEnricher) enrichSynthEvent(event *beat.Event, se *SynthEvent) e
}

func (je *journeyEnricher) createSummary(event *beat.Event) error {
// TODO: Remove this when zip monitors are removed and we have 1:1 monitor / journey
defer func() {
je.streamEnricher.checkGroup = makeUuid()
}()

var up, down int
if je.errorCount > 0 {
up = 0
Expand Down Expand Up @@ -206,10 +211,6 @@ func (je *journeyEnricher) createSummary(event *beat.Event) error {
if je.journeyComplete {
return je.error
}

// create a new check group for the next journey
je.streamEnricher.checkGroup = makeUuid()

return fmt.Errorf("journey did not finish executing, %d steps ran: %w", je.stepCount, je.error)
}

Expand Down

0 comments on commit efce225

Please sign in to comment.