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

dispatch: don't allow nil registry for metrics #2202

Conversation

simonpasquier
Copy link
Member

No description provided.

@roidelapluie
Copy link
Member

This is a patter we have in prometheus too. Why do you want to get rid of it?

@beorn7
Copy link
Member

beorn7 commented Mar 10, 2020

Indeed. It helps for testing and such.

I don't quite buy the argument of accidentally passing nil. Writing NewDispatcherMetrics(nil) is quite explicit and shouldn't happen accidentally (or you could say that even if nil is disallowed, you could still "accidentally" pass in a no-op registry).

@simonpasquier
Copy link
Member Author

Oki doki. I'll close it then...

@simonpasquier simonpasquier deleted the dont-allow-nil-registerer branch March 13, 2020 14:26
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.

3 participants