Skip to content

feat: add ClearRegistry endpoint to clear all metrics immediately - #752

Closed
AruneshDwivedi wants to merge 1 commit into
prometheus:masterfrom
AruneshDwivedi:fix-clear-registry
Closed

feat: add ClearRegistry endpoint to clear all metrics immediately#752
AruneshDwivedi wants to merge 1 commit into
prometheus:masterfrom
AruneshDwivedi:fix-clear-registry

Conversation

@AruneshDwivedi

Copy link
Copy Markdown

Fixes #637

Adds a ClearRegistry method to the Registry interface that immediately removes
all registered metrics. This allows users to clear the metric registry without
quitting the exporter.

Use case: When working with large clusters of statsd_exporter where the number
of instances changes or order changes, metrics distribution keys change due to
hashing on statsrelay. Users need a way to immediately forget accumulated
metrics and start collecting in a new distribution.

This is different from /-/reload (metrics persist) and /-/quit (disruptive).

Signed-off-by: Arunesh Dwivedi <arunesh.devops@gmail.com>
@pedro-stanaka

Copy link
Copy Markdown
Contributor

We already have #747 which is working on that, I would rather work with that first for now.

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.

lifecycle web endpoint for clearing the registry

2 participants