-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add log correlation to proxy tracing docs #31037
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
Conversation
✅ Documentation Team ReviewThe documentation team has approved this pull request. Thank you for your contribution! |
Preview links (active after the
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC adding the span ID provide granular correlation between logs and spans. I would recommend setting the span ID but in under no circumstances I think it is mandatory. Up to you to add it or not.
LGTM, excellent job. Thank you @brett0000FF !
{{< tabs >}} | ||
{{% tab "Datadog NGINX Module" %}} | ||
|
||
If you installed the [Datadog NGINX module][100], use the `$datadog_trace_id` variable. This value is `-` for requests that are not traced. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would also suggest to use the span ID with $datadog_span_id
. The OTel equivalent is $opentelemetry_span_id
.
1. Select [Grok Parser][10] as the processor type. | ||
1. Define the following parsing rule to extract the trace ID attribute from a log event. This rule works for both the Datadog module and OpenTelemetry outputs: | ||
```text | ||
extract_trace_id %{data} dd.trace_id="%{notSpace:dd.trace_id:nullIf("-")}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you decide to add the span ID, you might also need to update the grok query
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @brett0000FF looks good just one broken link that needs moved from the bottom of the page to the tab content.
What does this PR do? What is the motivation?
Addresses the fragmented user experience for setting up NGINX APM tracing and log correlation. Previously, the instructions were split between the main Instrumenting NGINX page and the more general Ease Troubleshooting With Cross-Product Correlation guide. This required users to navigate between two separate documents to complete a single, common workflow.
This update consolidates all NGINX-specific instructions into the Instrumenting NGINX document.
Changes Made
Modified tracing/trace_collection/proxy_setup.md:
Modified logs/guide/ease-troubleshooting-with-cross-product-correlation.md:
Merge instructions
Merge readiness:
For Datadog employees:
Your branch name MUST follow the
<name>/<description>
convention and include the forward slash (/
). Without this format, your pull request will not pass CI, the GitLab pipeline will not run, and you won't get a branch preview. Getting a branch preview makes it easier for us to check any issues with your PR, such as broken links.If your branch doesn't follow this format, rename it or create a new branch and PR.
[6/5/2025] Merge queue has been disabled on the documentation repo. If you have write access to the repo, the PR has been reviewed by a Documentation team member, and all of the required checks have passed, you can use the Squash and Merge button to merge the PR. If you don't have write access, or you need help, reach out in the #documentation channel in Slack.
Additional notes