-
Notifications
You must be signed in to change notification settings - Fork 815
'Counter' object has no attribute '_value' #454
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
Comments
Do you want to send a PR? |
sure! |
I think I need access to the repo, not currently able to push to a remote branch |
Fork it in github, and push your branch there. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi all,
I'm running into an issue when creating an exception counter out of a standard counter without passing label names. Specifically, it does not provide an informative error if a user incorrectly passes labels when calling
count_exceptions
. Code to replicate:Expected behavior:
c.count_exceptions()
should raise an informative error message because the incorrect labels are passed.Actual behavior:
AttributeError: 'Counter' object has no attribute '_value'
occurs when the exception is raised, because we are trying to increment an non observable metric.Proposed fix: Check
self._is_observable()
in thecount_exceptions
method, and raise an error if the user is constructing anExceptionCounter
out of a non observableCounter
.The text was updated successfully, but these errors were encountered: