-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inline monitor syntax errors should send errors to ES #29897
Comments
As a note on this, just to clarify the ACs:
So far, I've assumed that we will do no changes to the runner, and, instead, we'll simply keep track of the current journey despite the error and attach a summary to it when there's something logged to Also, as I was investigating this issue, I was puzzled by the following behaviour:
This seems to happen because when I copy the journey from the configuration file, it preserves line-breaks, and therefore throws a When Heartbeat runs it, however, it seems like line breaks are not present, which then trigger a Considering that the line-breaks could influence the script's execution, should we look into changing that too? |
Thanks @lucasfcosta for adding in more details. I might have given a bad example here. Lets replace the inline script with
Synthetics runner at this point cannot run any journeys and would straight away exit with status code 1 and write the errors back to We need like a catch all error handler in the HB side that can swallow the error from Synthetics and create a monitor summary document with those context.
I wouldn't worry too much on this one once we have a catch all handler, we don't need to deal with line-breaks in a different way. Please do correct me if i have not thought about some other scenarios. |
I've re-assigned this to @vigneshshanmugam since he's started work on a fix here based on a conversation we started earlier today, as well as #29505 since it will make more sense to fix them both together than separately. The reason being that both require introducing more suite concepts which will dovetail nicely with #29917 when we're ready to pull that issue. I'm documenting some of the schema changes from that discussion here. This could warrant a new issue, but we already have an explosion of issues being handled by a single PR, so I'm OK trying to keep things lean and document this change in this comment. In essence, the heartbeat code needs a clearer concept of when it's in the context of a suite or a monitor. At this point, we should also add the ECS Suite, no active journey
Suite, active journey
Inline
|
Error can be reproduced by running the below monitor.
stderr
without any JSON marshalling as it cannot get the registered journeys. In these cases, HB cannot write the summary event as there are no acrtive journeys.By disabling this check, we get the summary event-
beats/x-pack/heartbeat/monitors/browser/synthexec/execmultiplexer.go
Line 37 in 96e393f
But we need to swallow the error and do it correctly.
The text was updated successfully, but these errors were encountered: