You can associate trace IDs with the business logs of an application. In this way,
when an error occurs to the application, you can access the business logs associated
with trace IDs to find out and troubleshoot the error.
Background information
In ARMS, trace IDs can be associated with business logs of an application based on
the Mapped Diagnostic Context (MDC) mechanism. The Log4j, Log4j 2, and Logback mainstream
log frameworks are supported.
Associate trace IDs with business logs
- Log on to the ARMS console.
- In the left-side navigation pane, choose . In the top navigation bar, select a region. On the Applications page, click the name of the application.
- In the left-side navigation pane, click Application Settings. On the page that appears, click the Custom Configuration tab.
- On the Custom Configuration tab, turn on Link Business Logs with TraceId in the Business Log Linking Settings section.

Note
- If Link Business Logs with TraceId is turned on, trace IDs are automatically generated
in the business logs.
- Add
%X{EagleEye-TraceID}
to the pattern property of the business log layout. The following figure shows how
to add this configuration for the Logback component.
Note For information about how to obtain {EagleEye-TraceID} from the business code, see
ARMS SDK.

- Restart the application.
If trace IDs are displayed in the business logs of the application, the business logs
are associated with the trace IDs, as shown in the following figure.
