start_http_server with make_asgi_app? #1000
Answered
by
LordKa0S
mecampbellsoup
asked this question in
Q&A
-
Hi guys, Quick question and hopefully not a dumb one but, nevertheless:
An alternative is to install We have a FastAPI + uvicorn (ASGI) application and are looking to expose some Prometheus metrics for export. |
Beta Was this translation helpful? Give feedback.
Answered by
LordKa0S
Jan 25, 2024
Replies: 1 comment
-
from fastapi import FastAPI
import prometheus_client
app = FastAPI()
metrics_app = prometheus_client.make_asgi_app()
app.mount("/metrics", metrics_app) Originally posted by @pquentin in #512 (comment) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
csmarchbanks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Originally posted by @pquentin in #512 (comment)