Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding new section for span ID remapper #26865

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 44 additions & 1 deletion content/en/logs/log_configuration/processors.md
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ Use the [Datadog Log Pipeline API endpoint][1] with the following lookup process

## Trace remapper

There are two ways to improve correlation between application traces and logs:
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][8]. Log integrations take care of all the rest of the setup by default.

Expand Down Expand Up @@ -758,6 +758,49 @@ Use the [Datadog Log Pipeline API endpoint][1] with the following trace remapper

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

## Span remapper

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

1. Follow the documentation on [how to inject a Span ID in the application logs][8]. Log integrations take care of all the rest of the setup by default.

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

{{< tabs >}}
{{% tab "UI" %}}

Define the span remapper processor on the [**Pipelines** page][1]. Enter the Span ID attribute path in the processor tile as follows:

{{< img src="logs/log_configuration/processor/trace_processor.png" alt="Trace ID processor" style="width:80%;">}}

[1]: https://app.datadoghq.com/logs/pipelines
{{% /tab %}}
{{% tab "API" %}}

Use the [Datadog Log Pipeline API endpoint][1] with the following span remapper JSON payload:

```json
{
"type": "span-id-remapper",
"name": "Define dd.span_id as the official span id associate to this log",
"is_enabled": true,
"sources": ["dd.span_id"]
}
```

| Parameter | Type | Required | Description |
|--------------|------------------|----------|--------------------------------------------------------|
| `type` | String | Yes | Type of the processor. |
| `name` | String | No | Name of the processor. |
| `is_enabled` | Boolean | No | If the processors is enabled or not. Default: `false`. |
| `sources` | Array of strings | No | Array of source attributes. Default: `dd.trace_id`. |

[1]: /api/v1/logs-pipelines/
{{% /tab %}}
{{< /tabs >}}

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

## Further Reading

{{< partial name="whats-next/whats-next.html" >}}
Expand Down
Loading