tencent cloud

Tencent Cloud Observability Platform

Release Notes and Announcements
Release Notes
Product Introduction
Overview
Strengths
Basic Features
Basic Concepts
Use Cases
Use Limits
Purchase Guide
Tencent Cloud Product Monitoring
Application Performance Management
Mobile App Performance Monitoring
Real User Monitoring
Cloud Automated Testing
Prometheus Monitoring
Grafana
EventBridge
PTS
Quick Start
Monitoring Overview
Instance Group
Tencent Cloud Product Monitoring
Application Performance Management
Real User Monitoring
Cloud Automated Testing
Performance Testing Service
Prometheus Getting Started
Grafana
Dashboard Creation
EventBridge
Alarm Service
Cloud Product Monitoring
Tencent Cloud Service Metrics
Operation Guide
CVM Agents
Cloud Product Monitoring Integration with Grafana
Troubleshooting
Practical Tutorial
Application Performance Management
Product Introduction
Access Guide
Operation Guide
Practical Tutorial
Parameter Information
FAQs
Mobile App Performance Monitoring
Overview
Operation Guide
Access Guide
Practical Tutorial
Tencent Cloud Real User Monitoring
Product Introduction
Operation Guide
Connection Guide
FAQs
Cloud Automated Testing
Product Introduction
Operation Guide
FAQs
Performance Testing Service
Overview
Operation Guide
Practice Tutorial
JavaScript API List
FAQs
Prometheus Monitoring
Product Introduction
Access Guide
Operation Guide
Practical Tutorial
Terraform
FAQs
Grafana
Product Introduction
Operation Guide
Guide on Grafana Common Features
FAQs
Dashboard
Overview
Operation Guide
Alarm Management
Console Operation Guide
Troubleshooting
FAQs
EventBridge
Product Introduction
Operation Guide
Practical Tutorial
FAQs
Report Management
FAQs
General
Alarm Service
Concepts
Monitoring Charts
CVM Agents
Dynamic Alarm Threshold
CM Connection to Grafana
Documentation Guide
Related Agreements
Application Performance Management Service Level Agreement
APM Privacy Policy
APM Data Processing And Security Agreement
RUM Service Level Agreement
Mobile Performance Monitoring Service Level Agreement
Cloud Automated Testing Service Level Agreement
Prometheus Service Level Agreement
TCMG Service Level Agreements
PTS Service Level Agreement
PTS Use Limits
Cloud Monitor Service Level Agreement
API Documentation
History
Introduction
API Category
Making API Requests
Monitoring Data Query APIs
Alarm APIs
Legacy Alert APIs
Notification Template APIs
TMP APIs
Grafana Service APIs
Event Center APIs
TencentCloud Managed Service for Prometheus APIs
Monitoring APIs
Data Types
Error Codes
Glossary

Error Monitoring

PDF
Mode fokus
Ukuran font
Terakhir diperbarui: 2024-11-01 19:46:40
 The Aegis instance of RUM automatically monitors exceptions such as JavaScript and Promise execution errors and Ajax (fetch) request exceptions. This document describes the monitoring logic of each error type and how to handle them.
Note:
The Aegis instance monitors such exceptions. If you only import the Aegis SDK but don't instantiate it, it won't report any data.

JavaScript Execution Error

Aegis listens on the onerror event in the window object to capture project errors. Then, it parses errors and analyze the heaps and stacks to automatically report the error information to the backend service. In this case, the report level is error; therefore, when the number of automatically reported errors reaches the threshold, Aegis will automatically trigger an alarm to help you find the exceptions promptly. As the report level is error, automatic reporting will also affect the project score.
If a cross-origin JavaScript script is imported on the page, you need to add the crossorigin attribute to the script tag; otherwise, Aegis cannot get the error details.
If the user uses the Vue framework, import the following code to get and actively report errors:
Vue.config.errorHandler = function(err, vm, info) {
console.log(`Error: ${err.toString()}\\nStack: ${err.stack}\\nInfo: ${info}`);
aegis.error(`Error: ${err.toString()}\\nStack: ${err.stack}\\nInfo: ${info}`);
};

Promise Execution Error

RUM listens on the unhandledrejection event to capture Promise errors that are not caught through catch. To ensure page stability, we recommend you catch all Promise errors.

Ajax (fetch) Request Exception

Aegis rewrites the XMLHttpRequest object to listen on each API request and will consider the following cases an exception:
http status is greater than or equal to 400.
A request times out or is aborted, cross-origin, or canceled.
http status is still 0 when a request ends, which usually occurs when the request fails.
Note:
When an error occurs, the Aegis SDK doesn't actively collect API request and response parameters. If you want such API information to be reported, you can use the apiDetail API parameter to enable reporting.
new Aegis({
api: {
apiDetail: true,
},
});

retcode Exception

Aegis rewrites the XMLHttpRequest object to get the API response. It also tries to get the retcode of the request in the response. If the retcode doesn't meet the expectation, the request will be considered exceptional and will be reported.
Note:
You can get retcode and judge which retcode values are normal as instructed in Configuration Guide.

Resource Loading Failure

If a request sent by a page element fails, it will be captured by the window.onerror event. Aegis uses this feature to listen on the loading failures of following resources:
CSS and font requested by the <link> tag.
Scripts requested by the <script> tag.
Multimedia resources requested by the <audio> and <video> tags.

Bantuan dan Dukungan

Apakah halaman ini membantu?

masukan