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

Allow enabling/disabling _created metrics from code #973

Merged
merged 1 commit into from Oct 27, 2023

Conversation

csmarchbanks
Copy link
Member

@csmarchbanks csmarchbanks commented Oct 26, 2023

Fixes #933

This takes the approach of globally enabling/disabling _created metrics still. Another option would be to enable/disable _created metrics on each registry, but that would be a larger change as we would have to keep persist the registry on each metric (or filter them out which seems more prone to errors/conflicts?). My thought is to start with the global option, but we could add the registry option for more fine use cases if required in the future?

@SuperQ WDYT?

@csmarchbanks csmarchbanks force-pushed the disable-created-from-code branch 2 times, most recently from 42057fe to bda7870 Compare October 26, 2023 22:11
Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
Copy link
Member

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

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

This seems like a fine solution for now.

Hopefully the new created timestamp handling gets implemented in upstream Prometheus soon. Then there will be less of a need for this, as well as making the data useful.

@csmarchbanks
Copy link
Member Author

Agreed, I am looking forward to that feature in Prometheus. Thanks for the review!

@csmarchbanks csmarchbanks merged commit ea78128 into master Oct 27, 2023
10 checks passed
@csmarchbanks csmarchbanks deleted the disable-created-from-code branch October 27, 2023 15:07
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.

Feature request: allow disabling "_created" series from code
2 participants