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

Correlation analysis of link and log

PDF
Focus Mode
Font Size
Last updated: 2025-03-13 15:58:12

Practical Background

As the microservices architecture has gradually become popular, accurately locating the complete lifecycle of a request in complex and large-scale systems has increasingly become one of the biggest pain points faced by R&D personnel. Taking the self - test process in R&D as an example, developers usually hope that after initiating an HTTP/RPC test request, they can obtain the context information of the entire test request in a simple way. This usually includes relevant upstream and downstream links, the method stacks of internal requests in each service, and data such as logs printed on the link. The demand for integrated monitoring of indicators - links - logs is urgent.
Tencent Cloud Application Performance Management (APM), as a full - link monitoring platform that itself includes indicators - links, has been integrated with Tencent Cloud Log Service (CLS), realizing integrated monitoring of indicators - links - logs. When viewing link details, associated information can be viewed correspondingly, completing the troubleshooting process from links to logs.

Prerequisites

Make sure that the application has been connected to Application Performance Monitoring (APM), and refer to the CLS Getting Started Guide to report business logs to Tencent Cloud Log Service (CLS).
Note:
To ensure the reliability of your log data and use the log service more efficiently, it is recommended that you use the CLS - optimized API/Agent to upload structured logs.
Submit via API/SDK. For details, see the contents section in Uploading Logs.
Submit via Agent. For details, see Collecting Logs by Using JSON Extraction Mode.

Operation Steps

Step 1: Output the TraceID To the Log

To achieve correlation query between link and log, you need to output the TraceID to the log. For applications accessing APM in the following two ways, the TraceID can be automatically injected into the log without modifying the code:
For applications accessing APM in other ways, please refer to the corresponding access documentation, obtain the TraceID in the code, and output the TraceID in the business log.

Step 2: Configure the Association Between the APM Application and the CLS Topic

Please refer to Associating Logs on the System Configuration Page to configure the association between the APM application and the CLS topic.

Step 3: Query the Business Logs Corresponding To the Link

1. Log in to Tencent Cloud Observability Platform and enter the Application Performance Monitoring > Distributed tracing page.
2. Select the corresponding business system, specify the query conditions, query the link invocation, and click TraceID to enter the Trace details page.
3. On the CLS logs tab, you can query the business logs corresponding to the link.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback