-
Notifications
You must be signed in to change notification settings - Fork 20
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
Adjust Prometheus plugin to the latest aioprometheus
version 21.9.0
#211
Conversation
e02885d
to
67ad26c
Compare
Codecov Report
@@ Coverage Diff @@
## master #211 +/- ##
=======================================
Coverage 99.55% 99.55%
=======================================
Files 42 42
Lines 1795 1795
=======================================
Hits 1787 1787
Misses 8 8
Continue to review full report at Codecov.
|
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.
Looks good to me. Thanks for that fix :-)
I did some digging through the aioprometheous source and judging by their older |
Yes, imports might work down to v16.06.1, but the API changes (automated registering of metrics) have been introduced in 21.9.0 according to the changelog and the commit. So, with earlier versions the changes will not work. |
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.
Thanks a lot for checking the version dependency! Go for it.
aioprometheus
has changed its API so that metrics are automatically registered when they are created according to https://github.com/claws/aioprometheus/blob/master/CHANGELOG.md. With newer versions the unittest is failing, because the method to register new metrics does not exists anymore. This pull request changes the Prometheus plugin accordingly and enforces the installation ofaioprometheus>=21.9.0
.