Skip to content

Commit

Permalink
added prometheus metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
extreme4all committed Aug 31, 2024
1 parent 1c0872e commit 578f527
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Binary file modified requirements.txt
Binary file not shown.
3 changes: 3 additions & 0 deletions src/core/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from fastapi.responses import JSONResponse

from src import api
from starlette_prometheus import metrics, PrometheusMiddleware

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -46,6 +47,8 @@ def create_app() -> FastAPI:


app = create_app()
app.add_middleware(PrometheusMiddleware)
app.add_route("/metrics", metrics)


@app.get("/")
Expand Down

0 comments on commit 578f527

Please sign in to comment.