Skip to content

Conversation

@kwaszczuk
Copy link

@kwaszczuk kwaszczuk commented Jul 11, 2025

Fixes: #623 (I believe it was incorrectly marked as fixed)

This PR adds exclude option to the DefaultMetricsCollectorConfiguration that allows to omit certain group of metrics from being collected.

My own use case is that I use a custom implementation of eventLoopLag metrics (though based on the original one), so I need to exclude them to avoid conflicts in registry, but others may want to also use it to remove redundant and unused metrics.

An alternative approach would be to expose the exports from lib/metrics in the public interface, allowing users to import and manually register only the specific metrics they need. I’m not sure, though, which approach is better - this one or the exclude approach.

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.

Provide exclusions for default metrics collected

1 participant