datadog-agent icon indicating copy to clipboard operation
datadog-agent copied to clipboard

Add support for filtering tags in k8s workloads.

Open lmello opened this issue 2 years ago • 5 comments
trafficstars

What does this PR do?

Just add the anotation tags.datadog.com/disable: "comma,separated,tags,to,be,disabled"

Add support in taglist to remove tags.

The idea is to use this before calling the tags.Compute() method The current implementation is done for k8s workloads, but it could be expanded to other places.

(ps: I am still learning go, please forgive any mistakes. )

Motivation

Wanted to exclude tags from the kubernetes workload for specific pods, this pr allows to do that during runtime.

Example: pod_name is high cardinality, I want it enabled for some services, but not for others.

Additional Notes

It reuses an existing annotation and is compatible with previous use cases of the annotation (only kube_service was supported before my change.)

Possible Drawbacks / Trade-offs

Describe how to test/QA your changes

Tested using unit testing and planning to rollout the agent with the changes in a subset of our infrastructure.

Reviewer's Checklist

  • [ ] If known, an appropriate milestone has been selected; otherwise the Triage milestone is set.
  • [ ] Use the major_change label if your change either has a major impact on the code base, is impacting multiple teams or is changing important well-established internals of the Agent. This label will be use during QA to make sure each team pay extra attention to the changed behavior. For any customer facing change use a releasenote.
  • [ ] A release note has been added or the changelog/no-changelog label has been applied.
  • [ ] Changed code has automated tests for its functionality.
  • [ ] Adequate QA/testing plan information is provided if the qa/skip-qa label is not applied.
  • [ ] At least one team/.. label has been applied, indicating the team(s) that should QA this change.
  • [ ] If applicable, docs team has been notified or an issue has been opened on the documentation repo.
  • [ ] If applicable, the need-change/operator and need-change/helm labels have been applied.
  • [ ] If applicable, the k8s/<min-version> label, indicating the lowest Kubernetes version compatible with this feature.
  • [ ] If applicable, the config template has been updated.

lmello avatar Oct 16 '23 14:10 lmello

CLA assistant check
All committers have signed the CLA.

bits-bot avatar Oct 16 '23 14:10 bits-bot

Can someone provide a feedback on this PR ?

lmello avatar Jan 05 '24 19:01 lmello

@lmello maybe you need to contact support to get them to send engineers here to look at it? I'm interested in your feature being added, so I hope they'll expedite the process.

2rs2ts avatar Jan 10 '24 19:01 2rs2ts

upport to get them to send engineers here to look at it? I'm interested in your feature being added, so I hope they'll expedite the process.

@2rs2ts I gave up, contacted support, TAM and it didn't move up. We end up building our own pipeline before shipping metrics and logs to datadog using vector, to sanitize and clean tags.

lmello avatar Jul 23 '24 00:07 lmello

I gave up, contacted support, TAM and it didn't move up. We end up building our own pipeline before shipping metrics and logs to datadog using vector, to sanitize and clean tags.

Boy is that a common story. Sorry to hear it, but I'm not surprised; it feels like engineering must be a skeleton crew over there

2rs2ts avatar Oct 23 '24 22:10 2rs2ts

it's amazing that someone at datadog wont even awk this PR. The company is just telling us all they care about is money and making firewalling tags in metrics hard to do that no one wants to do it.

mzupan avatar Apr 23 '25 16:04 mzupan

This pull request has been automatically marked as stale because it has not had activity in the past 15 days.

It will be closed in 30 days if no further activity occurs. If this pull request is still relevant, adding a comment or pushing new commits will keep it open. Also, you can always reopen the pull request if you missed the window.

Thank you for your contributions!

dd-octo-sts[bot] avatar Oct 18 '25 22:10 dd-octo-sts[bot]

Incredible that if the Datadog engineers just don't get to a PR in a month, the bot will just close it. That's insane and will definitely lead to a lot of wasted work. And spamming OP with messages doesn't help anybody...

2rs2ts avatar Nov 05 '25 01:11 2rs2ts

Hi @2rs2ts,

Thank you for taking the time to share your feedback. We recently introduced a system to help manage long-standing issues through automated stale management. We understand this may have come as a surprise for some existing issues. We want to apologize if it felt that way. It was not our intent, and we want to reassure you that every issue is important to us and reviewed carefully. For your specific issue, we’re reviewing it to ensure the discussion progresses and receives the right level of attention. Thank you for helping improve the Datadog Agent.

— The Datadog Agent Team

chouetz avatar Nov 12 '25 17:11 chouetz