Emit summaries when synthetics exits without emitting journey/end [#30729]#30825
Merged
lucasfcosta merged 1 commit intoelastic:mainfrom Mar 17, 2022
Merged
Conversation
Contributor
|
Pinging @elastic/uptime (Team:Uptime) |
eec5349 to
bcea7d8
Compare
Contributor
vigneshshanmugam
approved these changes
Mar 15, 2022
Member
vigneshshanmugam
left a comment
There was a problem hiding this comment.
LTGM
Did the manual tests that are specified in the action for reviewers.
Member
There was a problem hiding this comment.
nit: we can remove this, step/start is not emitted by synthetics.
bcea7d8 to
9f0a99a
Compare
lucasfcosta
pushed a commit
that referenced
this pull request
Mar 21, 2022
lucasfcosta
pushed a commit
that referenced
this pull request
Mar 22, 2022
kush-elastic
pushed a commit
to kush-elastic/beats
that referenced
this pull request
May 2, 2022
chrisberkhout
pushed a commit
that referenced
this pull request
Jun 1, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR fixes #30729 by always emitting
heartbeat/summarydocuments when a command exits withoutjourney/end.These documents have the following message:
Why is it important?
Such a change will cause the Uptime UI to be able to display correct results even if a journey execution exits successfully but doesn't manage to write a
journey/endevent to the desired descriptor. Such a situation could happen when the synthetics runner buffer was full and wasn't emptied on time before the command's exit, as described in elastic/synthetics#446 and fixed in elastic/synthetics#465Checklist
CHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.Author's Checklist
I've done so myself, but would like reviewers to verify the following:
journey/endstatus code > 0and do not emitjourney/endstatus code == 0and emitjourney/endHow to test this PR locally
To test this PR locally you must have a version of the
syntheticsrunner which does not emitjourney/endevents once its finished. Then, you'll use that version to run a browser monitor and verify that the documents in Kibana do contain summaries with the following error message:syntheticspackage by removing these lines which are responsible for emittingjourney/endevents: https://github.com/elastic/synthetics/blob/e594196f4b083917fb7e44d67e208e1a87ea29a5/src/reporters/json.ts#L474-L484 (just comment them).pbpaste | elastic-synthetics --screenshots off --inline --rich-events | jq .typejourney/endis emitted when running this journey. You must verify that because when runningheartbeatyou want to simulate what would happen when journeys exit without emittingjourney/end.heartbeat.heartbeatexecutable you just compiled with the following monitor:ELASTIC_SYNTHETICS_CAPABLE=true ./heartbeat -c /tmp/heartbeat.yml -e -d "*"for that.Related issues
Screenshots