Expose prometheus metrics for all apps
This commit is contained in:
parent
e13a05cb43
commit
0f02181e33
@ -12,4 +12,5 @@ aio-pika
|
||||
httpx
|
||||
pydantic-settings
|
||||
python-jose
|
||||
passlib[bcrypt]
|
||||
passlib[bcrypt]
|
||||
prometheus_fastapi_instrumentator==7.0.2
|
||||
|
||||
@ -11,6 +11,7 @@ from webapi.providers import database
|
||||
from webapi.providers import exception_handler
|
||||
from .freeleaps_app import FreeleapsApp
|
||||
|
||||
from prometheus_fastapi_instrumentator import Instrumentator
|
||||
|
||||
def create_app() -> FastAPI:
|
||||
logging.info("App initializing")
|
||||
@ -26,6 +27,8 @@ def create_app() -> FastAPI:
|
||||
|
||||
# Call the custom_openapi function to change the OpenAPI version
|
||||
customize_openapi_security(app)
|
||||
# expose prometheus metrics
|
||||
Instrumentator().instrument(app).expose(app)
|
||||
return app
|
||||
|
||||
|
||||
|
||||
@ -12,4 +12,5 @@ python-multipart
|
||||
python-jose
|
||||
azure-storage-blob==12.22.0
|
||||
azure-identity
|
||||
azure-core[aio]
|
||||
azure-core[aio]
|
||||
prometheus_fastapi_instrumentator==7.0.2
|
||||
|
||||
@ -10,6 +10,8 @@ from webapi.providers import scheduler
|
||||
from webapi.providers import exception_handler
|
||||
from .freeleaps_app import FreeleapsApp
|
||||
|
||||
from prometheus_fastapi_instrumentator import Instrumentator
|
||||
|
||||
|
||||
def create_app() -> FastAPI:
|
||||
logging.info("App initializing")
|
||||
@ -25,6 +27,8 @@ def create_app() -> FastAPI:
|
||||
|
||||
# Call the custom_openapi function to change the OpenAPI version
|
||||
customize_openapi_security(app)
|
||||
# expose prometheus metrics
|
||||
Instrumentator().instrument(app).expose(app)
|
||||
return app
|
||||
|
||||
|
||||
|
||||
@ -30,4 +30,5 @@ azure-storage-blob[aio]
|
||||
azure-identity
|
||||
azure-core[aio]
|
||||
sendgrid
|
||||
httpx
|
||||
httpx
|
||||
prometheus_fastapi_instrumentator==7.0.2
|
||||
|
||||
@ -11,6 +11,7 @@ from webapi.providers import scheduler
|
||||
from webapi.providers import exception_handler
|
||||
from .freeleaps_app import FreeleapsApp
|
||||
|
||||
from prometheus_fastapi_instrumentator import Instrumentator
|
||||
|
||||
def create_app() -> FastAPI:
|
||||
logging.info("App initializing")
|
||||
@ -26,6 +27,8 @@ def create_app() -> FastAPI:
|
||||
|
||||
# Call the custom_openapi function to change the OpenAPI version
|
||||
customize_openapi_security(app)
|
||||
# expose prometheus metrics
|
||||
Instrumentator().instrument(app).expose(app)
|
||||
return app
|
||||
|
||||
|
||||
|
||||
@ -11,4 +11,5 @@ aio-pika
|
||||
twilio
|
||||
pydantic-settings
|
||||
python-multipart
|
||||
python-jose
|
||||
python-jose
|
||||
prometheus_fastapi_instrumentator==7.0.2
|
||||
|
||||
@ -11,6 +11,7 @@ from webapi.providers import message_queue
|
||||
from webapi.providers import exception_handler
|
||||
from .freeleaps_app import FreeleapsApp
|
||||
|
||||
from prometheus_fastapi_instrumentator import Instrumentator
|
||||
|
||||
def create_app() -> FastAPI:
|
||||
logging.info("App initializing")
|
||||
@ -27,6 +28,8 @@ def create_app() -> FastAPI:
|
||||
|
||||
# Call the custom_openapi function to change the OpenAPI version
|
||||
customize_openapi_security(app)
|
||||
# expose prometheus metrics
|
||||
Instrumentator().instrument(app).expose(app)
|
||||
return app
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user