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

Print in middleware component #156

Closed
mattzque opened this issue Jun 21, 2022 · 5 comments · Fixed by #157
Closed

Print in middleware component #156

mattzque opened this issue Jun 21, 2022 · 5 comments · Fixed by #157

Comments

@mattzque
Copy link

In version 5.8.2 the PrometheusInstrumentatorMiddleware prints to stdout on every request, this should not be in the release:

https://github.com/trallnag/prometheus-fastapi-instrumentator/blob/master/prometheus_fastapi_instrumentator/middleware.py#L80

Workaround: Downgrade to 5.8.1

@pawamoy
Copy link

pawamoy commented Jun 27, 2022

Hahahaha I was going crazy, looking for print statements in my own code, then in every involved library (uvicorn, starlette, fastapi, ...) 🤣

@nikitunkun
Copy link

I went through all the code looking for this print...
Waiting for a fix 🙃

@pawamoy
Copy link

pawamoy commented Jun 28, 2022

In the meantime I excluded 5.8.2 from my accepted range:

dependencies = [
    ...
    "prometheus-fastapi-instrumentator>=5.5.1,!=5.8.2",
    ...
]

@Jason-CKY
Copy link

Hope this is fixed soon

aemaem added a commit to aemaem/prometheus-fastapi-instrumentator that referenced this issue Aug 3, 2022
@trallnag trallnag linked a pull request Aug 22, 2022 that will close this issue
@trallnag
Copy link
Owner

Fixed in #157. Will be released soon(tm)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
5 participants