Atatus Ruby APM Agent extends your application’s logging capabilities with log correlation, allowing you to connect logs, traces, and transactions for easier debugging and deeper observability. These features help you:
  • Automatically include trace and transaction IDs in your application logs.
  • Seamlessly connect logs and traces within the Atatus dashboard.

Log Correlation

Log correlation lets you trace individual requests across systems by automatically adding correlation identifiers (trace, transaction, and span IDs) to your logs. With log correlation enabled, the Atatus Ruby Agent automatically injects these identifiers into your application logs: These IDs connect your logs with traces, making it easy to jump from a log entry to its related transaction in the Atatus dashboard.

Rails TaggedLogging

If your Ruby on Rails application uses ActiveSupport::TaggedLogging, you can enable log correlation by adding the following snippet to your environment configuration file (e.g., config/environments/production.rb):
Example log output:
Note: Because of the timing of log generation in Rails, the span ID might not always appear in the log output.

Manual Log Formatter

You can also manually customize your logger to include correlation IDs directly in plain Ruby or non-Rails apps.
This produces logs similar to: