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

feat(inputs.prometheus): control which pod metadata is added as tags #12851

Merged
merged 2 commits into from
Apr 3, 2023

Conversation

redbaron
Copy link
Contributor

@redbaron redbaron commented Mar 13, 2023

resolves #12850

Add pod_annotation_include, pod_annotation_exclude, pod_label_include, pod_label_exclude which control how pod metadata is added to the metric tags. Works very much like existing taginclude/tagexclude, but allows better control as they act on pod metadata exclusively.

@redbaron redbaron changed the title feat(inputs.prometheus) filter which pod labels and annotations will … feat(inputs.prometheus): filter which pod labels and annotations will … Mar 13, 2023
@redbaron redbaron force-pushed the pod-annotation-filter branch 2 times, most recently from 0a27750 to a65f62f Compare March 13, 2023 15:55
@redbaron redbaron changed the title feat(inputs.prometheus): filter which pod labels and annotations will … feat(inputs.prometheus): control which pod metadata is added as tags Mar 13, 2023
@telegraf-tiger
Copy link
Contributor

Copy link
Contributor

@powersj powersj left a comment

Choose a reason for hiding this comment

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

I haven't had a chance to talk to Sven about this one, but given the wide range of annotations and how we are handling them, this seems like a nice addition.

Thanks!

@powersj powersj added the ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review. label Mar 30, 2023
Copy link
Member

@srebhan srebhan left a comment

Choose a reason for hiding this comment

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

I like the approach. Thanks for adding this feature @redbaron!

@srebhan srebhan merged commit 5fdeae1 into influxdata:master Apr 3, 2023
@srebhan srebhan added feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin area/prometheus plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins labels Apr 3, 2023
@redbaron redbaron deleted the pod-annotation-filter branch April 3, 2023 11:24
@srebhan srebhan added this to the v1.27.0 milestone Jun 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/prometheus feat Improvement on an existing feature such as adding a new setting/mode to an existing plugin plugin/input 1. Request for new input plugins 2. Issues/PRs that are related to input plugins ready for final review This pull request has been reviewed and/or tested by multiple users and is ready for a final review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

inputs.prometheus: fine grained control over pod labels/annotations as tags
3 participants