If you use Tencent Cloud Log Service (CLS) to store logs, you can associate link data with log data. When an application encounters performance issues, you can quickly query the business logs corresponding to a link in the Application Performance Management (APM) console, and promptly perform localization analysis and problem-solving.
Prerequisites
Directions
Step 1: Output TraceID To Logs
To achieve association query between links and logs, you need to output TraceID to the logs. For applications accessing APM in the following two ways, TraceID can be automatically injected into the logs without modifying the code:
For applications accessing APM in other ways, please refer to the corresponding access documentation, obtain TraceID in the code, and output TraceID in the business logs.
Step 2: Associate Logs On the System Configuration Page
2. In the left sidebar, select APM > System Configuration > Business System Configuration page.
3. Select the corresponding business system, and click edit on the log association page.
4. Configure the log association information.
Enable associated logs.
Select the corresponding log region, log set and log topic.
5. Click Confirm after completing the configuration.
Step 3: View Log Information On the Link Query Page
2. In the left sidebar, select APM > Linkage Tracking to enter the linkage tracking page.
3. Select the corresponding business system, find the corresponding TraceID, and click TraceID to enter link detail.
4. Switch the log menu in the right window to view the log-related information and troubleshoot faults.