Skip to content

Conversation

@sambart19
Copy link
Contributor

What does this PR do?

Currently this plugin duplicates docker and kubernetes attributes into tags. While useful, this means that the logs uploaded to datadog are now larger than they otherwise would be, leading to increased bytes ingested and therefore increased costs. This PR aims to provide a configuration option to delete kubernetes and docker attributes from the log after the relevant information has been extracted into tags.

This should address the issue #42 that has been open for 5 years at this point.

Motivation

Removing this duplicative data should reduce load and costs for people using the plugin. In a test from logs on my applications I was seeing a roughly 30% reduction in overall bytes ingested.

Additional Notes

This change intentionally removes all docker and kubernetes attributes from the logs after the relevant tags are extracted, not limited to just the ones that are specifically added as tags as part of the plugin. Many of the attributes are already included elsewhere as tags, and IMO the improvement from cleaning them all up is worth the trade off of potentially needing to map a couple custom kubernetes / docker attributes to a different spot in the record if someone does not want them removed.

Copy link
Contributor

@andrewqian2001datadog andrewqian2001datadog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@andrewqian2001datadog
Copy link
Contributor

/merge

@dd-devflow-routing-codex
Copy link

dd-devflow-routing-codex bot commented Dec 17, 2025

View all feedbacks in Devflow UI.

2025-12-17 19:08:36 UTC ℹ️ Start processing command /merge


2025-12-17 19:08:42 UTC ℹ️ MergeQueue: waiting for PR to be ready

This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
It will be added to the queue as soon as checks pass and/or get approvals.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2025-12-17 19:11:50 UTC ℹ️ MergeQueue: This merge request was already merged

This pull request was merged directly.

@andrewqian2001datadog
Copy link
Contributor

/merge

@dd-devflow-routing-codex
Copy link

dd-devflow-routing-codex bot commented Dec 17, 2025

View all feedbacks in Devflow UI.

2025-12-17 19:11:27 UTC ℹ️ Start processing command /merge


2025-12-17 19:11:29 UTC ❌ MergeQueue

PR already in the queue with status waiting

@andrewqian2001datadog andrewqian2001datadog merged commit ddc1cfb into DataDog:master Dec 17, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants