File tree 3 files changed +7
-0
lines changed
3 files changed +7
-0
lines changed Original file line number Diff line number Diff line change 2
2
from fastapi .datastructures import FormData
3
3
from fastapi .responses import JSONResponse
4
4
from fastapi .security import APIKeyHeader
5
+ from prometheus_client import make_asgi_app
5
6
import logging
6
7
import os
7
8
31
32
openapi_tags = [{"name" : "general" }],
32
33
)
33
34
35
+ metrics_app = make_asgi_app ()
36
+ app .mount ("/metrics" , metrics_app )
37
+
34
38
# Note(austin) - This logger just dumps exceptions
35
39
# We'd rather handle those below, so disable this in deployments
36
40
uvicorn_logger = logging .getLogger ("uvicorn.error" )
Original file line number Diff line number Diff line change @@ -16,3 +16,4 @@ backoff
16
16
pypdf
17
17
pycryptodome
18
18
psutil
19
+ prometheus_client
Original file line number Diff line number Diff line change @@ -244,6 +244,8 @@ pillow==10.4.0
244
244
# unstructured-pytesseract
245
245
portalocker==2.10.1
246
246
# via iopath
247
+ prometheus-client==0.21.0
248
+ # via -r requirements/base.in
247
249
proto-plus==1.24.0
248
250
# via
249
251
# google-api-core
You can’t perform that action at this time.
0 commit comments