This is a cache of https://www.elastic.co/guide/en/apm/agent/go/current/logs.html. It is a snapshot of the page at 2024-12-16T00:59:53.716+0000.
Logs | APM Go Agent Reference [<strong>2</strong>.x] | Elastic

Logs

edit

Elastic APM Go Agent provides Log Correlation. The agent will automaticaly inject correlation IDs that allow navigation between logs, traces and services.

This features is part of Application log ingestion strategies.

The ecslogrus and ecszap libraries can also be used to use the ECS logging format without an APM agent. When deployed with the Go APM agent, the agent will provide log correlation IDs.

The Go agent provides integrations for popular logging frameworks that inject trace ID fields into the application217;s log records. You can find a list of the supported logging frameworks under supported technologies.

If your favorite logging framework is not already supported, there are two other options:

  • Open a feature request, or contribute code, for additional support as described in Contributing.
  • Manually inject trace IDs into log records, as described below in Manual log correlation.