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

Add support for filtering tags in k8s workloads. #20161

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lmello
Copy link

@lmello lmello commented Oct 16, 2023

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.

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.
@lmello lmello requested a review from a team as a code owner October 16, 2023 14:12
@bits-bot
Copy link
Collaborator

bits-bot commented Oct 16, 2023

CLA assistant check
All committers have signed the CLA.

@lmello
Copy link
Author

lmello commented Jan 5, 2024

Can someone provide a feedback on this PR ?

@2rs2ts
Copy link

2rs2ts commented Jan 10, 2024

@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.

@lmello
Copy link
Author

lmello commented Jul 23, 2024

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.

@clamoriniere clamoriniere requested a review from a team August 29, 2024 07:47
@2rs2ts
Copy link

2rs2ts commented Oct 23, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants