このページは日本語には対応しておりません。随時翻訳に取り組んでいます。
翻訳に関してご質問やご意見ございましたら、お気軽にご連絡ください

Overview

There are two ways to define correlation between application traces and logs:

  1. Follow the documentation on how to inject a Trace ID in the application logs. Log integrations automatically handle all remaining setup steps by default.

  2. Use the trace remapper processor to define a log attribute as its associated trace ID.

Use cases

The Trace Remapper is typically used to select the Trace ID within a log message that needs first to be parsed with a Grok Parser.

API

Use the Datadog Log Pipeline API endpoint with the following trace remapper JSON payload:

{
  "type": "trace-id-remapper",
  "name": "Define dd.trace_id as the official trace id associated with this log",
  "is_enabled": true,
  "sources": ["dd.trace_id"]
}
ParameterTypeRequiredDescription
typeStringYesType of the processor.
nameStringNoName of the processor.
is_enabledBooleanNoIf the processor is enabled or not. Default: false.
sourcesArray of stringsNoArray of source attributes. Default: dd.trace_id.

Note: Trace IDs and span IDs are not displayed in your logs or log attributes in the UI.

Further reading

お役に立つドキュメント、リンクや記事: