elastic / uptime

This project includes resources and general issue tracking for the Elastic Uptime solution
12 stars 3 forks source link

Not seeing unhandled exceptions #368

Closed paulb-elastic closed 2 years ago

paulb-elastic commented 2 years ago

Using beta.14 of Synthetics (from the 8.0.0-SNAPSHOT Docker Heartbeat image) and the 7.x branch of Kibana, I am not seeing the unhandled exceptions as implemented in https://github.com/elastic/synthetics/issues/226.

I have a monitor configured to hit a web page with the following JS script error:

<script>
    function foo() {
        // do nothing
    }
    // call invalid function
    bar();
</script>

This generates an error in the browser as expected, but this is not being shown against the result in Uptime (I'm expecting it to be in the console output):

image

Note that I have caused the monitor to fail at the step too (using deepStrictEqual(content, "this does not exist");), as I understand that these console errors will only be shown if the monitor itself fails at that step too.

I am seeing the error in the document (with a redacted URL here):

          "synthetics" : {
            "journey" : {
              "id" : "Page with error",
              "name" : "Page with error"
            },
            "error" : {
              "name" : "ReferenceError",
              "message" : "bar is not defined",
              "stack" : """ReferenceError: bar is not defined
    at https://www.redacted-url.com/page.html:17:2"""
            },
            "type" : "journey/browserconsole",
            "package_version" : "1.0.0-beta.14",
            "index" : 68,
            "payload" : {
              "text" : "bar is not defined",
              "type" : "error"
            },
            "step" : {
              "duration" : {
                "us" : 0
              },
              "name" : "Page with error",
              "index" : 1,
              "status" : ""
            }
          },
dominiqueclarke commented 2 years ago

Seeing expected console output on Kibana branch 7.16 on commit 0c347055e667851383a7415dfeaaa985bc01fe07