LogTagging
The Log Coloring function is used to embed Trace information (TraceID, spanID, traceFlag) into application logs, enabling the association between logs and call chains (Traces). This facilitates quick location of call chains through logs and analysis of distributed system issues. Currently, it supports log frameworks in the Java ecosystem (such as log4j, log4j2, logback, java.util.logging, etc.).
How to Configure Log Coloring
-
Navigate to Deployment Configuration -> Rule Configuration -> Data Collection -> Log Coloring

-
The platform preconfigures a default rule, which takes effect for all service interfaces by default

-
Click the Create button to enter the configuration page

- Conditions: The scope where the indicator rule takes effect.
- Configuration Items: Used to define the behavior of "whether Trace identifiers are automatically appended to application logs".
- Append Trace identifiers to application logs: For service logs that meet the rules, Trace information (TraceID, spanID, etc.) will be automatically embedded.
- Do not append Trace identifiers to application logs: For service logs that meet the rules, no Trace information will be embedded.
- Description: Fill in a description of the rule to facilitate understanding of its purpose later.
Usage Scenarios
After successful configuration, you can view log details and perform data analysis in the Search Center -> Call Chains -> Call Chain Details -> Logs module. The following scenario is an example:
When a business issue occurs, during the analysis of the error call chain, you can quickly locate the log data generated synchronously when the error call chain occurred, helping you resolve the issue as soon as possible. As shown in the figure below
