claws / aioprometheus

A Prometheus Python client library for asyncio-based applications
174 stars 21 forks source link

Use specified registry in middleware collectors #71

Closed JacobHenner closed 2 years ago

JacobHenner commented 2 years ago

The user-specified registry was not passed to the middleware collectors, so the default registry was always used.

The user-specified registry is now passed to the collectors. If the user does not specify a registry the default registry will be used.

Fixes #70

claws commented 2 years ago

Looks like it's just a style issue holding up the CI pipeline. Can you run make style, see: style, then push the changes to this branch?

JacobHenner commented 2 years ago

Looks like it's just a style issue holding up the CI pipeline. Can you run make style, see: style, then push the changes to this branch?

Oddly, the offending code was not part of my contribution. I've pushed a commit to address these lines.

claws commented 2 years ago

Yeah, I think it's related to changes in the formatter which can update because the version is not pinned. I tried to work out a way to push updates to your branch but couldn't quickly work out how to do that.

On Mon, 7 Mar 2022, 11:14 Jacob Henner, @.***> wrote:

Looks like it's just a style issue holding up the CI pipeline. Can you run make style, see: style https://github.com/claws/aioprometheus/blob/master/docs/dev/index.rst#code-style, then push the changes to this branch?

Oddly, the offending code was not part of my contribution. I've pushed a commit to address these lines.

— Reply to this email directly, view it on GitHub https://github.com/claws/aioprometheus/pull/71#issuecomment-1060081069, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJ44UJM6PGDTAQRKBK4543U6VGQJANCNFSM5OWLI4TA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you commented.Message ID: @.***>

codecov-commenter commented 2 years ago

Codecov Report

Merging #71 (7982588) into master (d0528e8) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #71   +/-   ##
=======================================
  Coverage   95.50%   95.50%           
=======================================
  Files          17       17           
  Lines         778      778           
  Branches       99      114   +15     
=======================================
  Hits          743      743           
  Misses         19       19           
  Partials       16       16           
Impacted Files Coverage Δ
src/aioprometheus/asgi/middleware.py 87.30% <ø> (ø)
src/aioprometheus/histogram.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d0528e8...7982588. Read the comment docs.

claws commented 2 years ago

Thanks, I'll make a new release to PyPI with this change in soon.