Menu
Grafana Cloud
Error reporting
Faro registers two error handlers:
onError
: to catch unhandled exceptions.onunhandledrejection
: to catch errors from rejected JavaScript Promises which don’t have rejection handlers attached.
The Faro data model for errors is a structured format containing the line number of the script file where the error occurred.
Enhance Script Error with full stack trace
When errors happen in third-party scripts, web browsers restrict access for security reasons and replace the contents of the errors with a generic “Script Error.” message.
If your trust the resources, you can instruct web browsers to reveal the error messages of third-party scripts:
Add crossorigin="anonymous"
to the respective script tags to instruct the browser to set the mode to cors
and the credentials mode to same-origin
for that specific request.
html
<!-- https://mysite.com:443 -->
<script src="http://mysite.com/myscript.js" crossorigin="anonymous"></script>
The server’s HTTP response which delivers the script to the client needs to have the Access-Control-Allow-Origin
header set:
htaccess
Access-Control-Allow-Origin: https://mysite.com:443
Was this page helpful?
Related resources from Grafana Labs
Additional helpful documentation, links, and articles:
Video
Getting started with the Grafana LGTM Stack
In this webinar, we’ll demo how to get started using the LGTM Stack: Loki for logs, Grafana for visualization, Tempo for traces, and Mimir for metrics.
Video
Intro to Kubernetes monitoring in Grafana Cloud
In this webinar you’ll learn how Grafana offers developers and SREs a simple and quick-to-value solution for monitoring their Kubernetes infrastructure.
Video
Building advanced Grafana dashboards
In this webinar, we’ll demo how to build and format Grafana dashboards.