Skip to content

Allow enabling/disabling _created metrics from code - #973

Merged
csmarchbanks merged 1 commit into
masterfrom
disable-created-from-code
Oct 27, 2023
Merged

csmarchbanks merged 1 commit into
masterfrom
disable-created-from-code

Conversation

@csmarchbanks

@csmarchbanks csmarchbanks commented Oct 26, 2023 •

Copy link
Copy Markdown
Member

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>
@csmarchbanks
csmarchbanks force-pushed the disable-created-from-code branch from bda7870 to faba022 Compare October 26, 2023 22:11

@SuperQ SuperQ left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
Member Author

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

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