This document provides code for logging errors and performance metrics to a centralized logging service.
The code defines classes and functions for starting and ending timing logs, constructing log payloads, and sending logs to the logging endpoint. On error, an error report is constructed containing the error message and stack trace, relevant context like the page URL, and performance data if available. Logs and errors are batched and sent asynchronously to avoid blocking.
This document provides code for logging errors and performance metrics to a centralized logging service.
The code defines classes and functions for starting and ending timing logs, constructing log payloads, and sending logs to the logging endpoint. On error, an error report is constructed containing the error message and stack trace, relevant context like the page URL, and performance data if available. Logs and errors are batched and sent asynchronously to avoid blocking.
This document provides code for logging errors and performance metrics to a centralized logging service.
The code defines classes and functions for starting and ending timing logs, constructing log payloads, and sending logs to the logging endpoint. On error, an error report is constructed containing the error message and stack trace, relevant context like the page URL, and performance data if available. Logs and errors are batched and sent asynchronously to avoid blocking.