File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22from fastapi .datastructures import FormData
33from fastapi .responses import JSONResponse
44from fastapi .security import APIKeyHeader
5+ from prometheus_client import make_asgi_app
56import logging
67import os
78
3132 openapi_tags = [{"name" : "general" }],
3233)
3334
35+ metrics_app = make_asgi_app ()
36+ app .mount ("/metrics" , metrics_app )
37+
3438# Note(austin) - This logger just dumps exceptions
3539# We'd rather handle those below, so disable this in deployments
3640uvicorn_logger = logging .getLogger ("uvicorn.error" )
Original file line number Diff line number Diff line change @@ -16,3 +16,4 @@ backoff
1616pypdf
1717pycryptodome
1818psutil
19+ prometheus_client
Original file line number Diff line number Diff line change @@ -244,6 +244,8 @@ pillow==10.4.0
244244 # unstructured-pytesseract
245245portalocker==2.10.1
246246 # via iopath
247+ prometheus-client==0.21.0
248+ # via -r requirements/base.in
247249proto-plus==1.24.0
248250 # via
249251 # google-api-core
You can’t perform that action at this time.
0 commit comments