refactor: create a new prometheus registry for every server#3170
Open
miparnisari wants to merge 1 commit into
Open
refactor: create a new prometheus registry for every server#3170miparnisari wants to merge 1 commit into
miparnisari wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
0c9aa08 to
5823f28
Compare
miparnisari
commented
Jun 10, 2026
| mux := http.NewServeMux() | ||
|
|
||
| mux.Handle("/metrics", promhttp.HandlerFor(prometheus.DefaultGatherer, promhttp.HandlerOpts{ | ||
| // TODO(miparnisari): use a custom registry instead of the default one! |
Contributor
Author
There was a problem hiding this comment.
i rabbit-holed into this: https://github.com/authzed/spicedb/pull/2966/files but it got gnarly. Too many places to change
5823f28 to
5528b85
Compare
5528b85 to
ef63296
Compare
ee2a2e1 to
3a39fe7
Compare
| if opts.prometheusSubsystem == "" { | ||
| opts.prometheusSubsystem = "dispatch_client" | ||
| if opts.metrics.PrometheusSubsystem == "" { | ||
| opts.metrics.PrometheusSubsystem = "dispatch_client" |
Member
There was a problem hiding this comment.
we should put these literals in consts while we're in here
3a39fe7 to
7d6c15d
Compare
7d6c15d to
9e347d7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
To avoid the "duplicate metrics registration" problem.