Application Real-Time Monitoring Service (ARMS) allows you to associate trace IDs with the logs of a Go application. This way, if an error occurs in the application, you can access the logs associated with the trace IDs to locate and troubleshoot the error.
Prerequisites
The application is compiled and deployed using the ARMS agent for Go.
Logs are collected by using Simple Log Service. For more information, see Data collection overview.
Background information
The capability of associating trace IDs with logs of Go microservices in ARMS relies on the instrumentation of log frameworks. The following table lists the supported log frameworks.
Component | Repository address | Minimum version | Maximum version |
Zerolog | V1.10.0 | V1.33.0 | |
Zap | V1.20.0 | V1.27.0 | |
Logrus | V1.5.0 | V1.9.3 | |
Log | V1.21 | N/A | |
Slog | V1.21 | N/A |
Procedure
Log on to the ARMS console. In the left-side navigation pane, choose .
Select a region in the top navigation bar and click the application.
NoteIcons in the Language column indicate the application's programming language:
: Java
: Go
: Python- (Hyphen): an application monitored in Managed Service for OpenTelemetry
In the top navigation bar, choose .
In the Application log Association configuration section of the Custom Configurations tab, set Log Source to Log service SLS. Turn on Automatically associate business logs with TraceId, select the region where your Simple Log Service is deployed, and bind a project and a Logstore.

Check whether trace IDs are displayed in the application logs, as shown in the following figure. If so, the logs are associated with the trace IDs.

(Optional) Configure log collection and upload application logs to the project and Logstore.
By default, the ARMS agent for Go does not collect application logs.
