Skip to content

Commit

Permalink
Heartbeat: add monitor.type to browser monitots (#30187) (#30196)
Browse files Browse the repository at this point in the history
(cherry picked from commit 0c8b1b1)

Co-authored-by: Vignesh Shanmugam <[email protected]>
  • Loading branch information
mergify[bot] and vigneshshanmugam authored Feb 3, 2022
1 parent 247d240 commit 3cec185
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions x-pack/heartbeat/monitors/browser/synthexec/enrich.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ func (je *journeyEnricher) enrich(event *beat.Event, se *SynthEvent, fields StdS
"monitor": common.MapStr{
"id": id,
"name": name,
"type": fields.Type,
},
})

Expand Down
2 changes: 2 additions & 0 deletions x-pack/heartbeat/monitors/browser/synthexec/enrich_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,14 @@ func TestJourneyEnricher(t *testing.T) {
"suite.name": stdFields.Name,
"monitor.id": fmt.Sprintf("%s-%s", stdFields.Id, journey.Id),
"monitor.name": fmt.Sprintf("%s - %s", stdFields.Name, journey.Name),
"monitor.type": stdFields.Type,
})
}
inlineValidator := func() validator.Validator {
return lookslike.MustCompile(common.MapStr{
"monitor.id": stdFields.Id,
"monitor.name": stdFields.Name,
"monitor.type": stdFields.Type,
})
}
commonValidator := func(se *SynthEvent) validator.Validator {
Expand Down

0 comments on commit 3cec185

Please sign in to comment.