Skip to content

start_http_server with make_asgi_app? #1000

Answered by LordKa0S
mecampbellsoup asked this question in Q&A
Discussion options

You must be logged in to vote
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)

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by csmarchbanks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #987 on January 25, 2024 17:01.