-
Notifications
You must be signed in to change notification settings - Fork 737
Create meters once to avoid gauge re-registration #29136
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
Conversation
|
Sample log warning:
|
c6d90dc to
4ae5db3
Compare
berkaycanbc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! 🚀
LGTM 👍
|
Successfully created backport PR for |
|
Successfully created backport PR for |
|
Successfully created backport PR for |
Description
This PR builds the meters once when the class is created. This not only avoids unnecessary allocation when modifying them, but it also ensures we're not re-registering the gauge multiple times.
Note that this was not broken before, as we were always using the same state object 😌 But it still led to ugly warnings about it.