Enhance forwarder.json with datadogTags parameter - #252
Open
gogi2811 wants to merge 1 commit into
Open
Conversation
Added datadogTags parameter for custom tags in logs. reference PR to support DD_TAGS : DataDog/azure-log-forwarding-orchestration#557
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added datadogTags parameter for custom tags in logs.
reference PR to support DD_TAGS : DataDog/azure-log-forwarding-orchestration#557
This PR addresses a Datadog support issue related to custom tagging at the forwarder layer (support ticket: https://help.datadoghq.com/hc/en-us/requests/3008581).
Context:
The customer was setting DD_TAGS as a space-separated key:value string on the container environment.
DD_ENV was also being set separately.
The forwarder job was running successfully and logs were arriving in Datadog, but the expected custom tags were not being attached to the forwarded log entries.
Root cause:
The forwarder was not correctly handling the DD_TAGS environment variable format for tag extraction/normalization.
As a result, values supplied as space-delimited key:value pairs were not being applied to forwarded logs.
Fix:
Ensure forwarder reads DD_TAGS correctly from the container environment.
Parse and apply tag values in the expected format.
Keep DD_ENV handling independent, so it can be configured explicitly without conflicting with custom tags.
Preserve expected behaviour for forwarded logs while allowing custom tags to be attached before ingestion.