Expose prometheus metrics for payment
This commit is contained in:
parent
a94dcca6c4
commit
dcae87d3e0
@ -9,6 +9,7 @@ beanie==1.21.0
|
|||||||
jieba==0.42.1
|
jieba==0.42.1
|
||||||
sendgrid
|
sendgrid
|
||||||
stripe==8.1.0
|
stripe==8.1.0
|
||||||
|
prometheus_fastapi_instrumentator==7.0.2
|
||||||
aio-pika
|
aio-pika
|
||||||
httpx
|
httpx
|
||||||
pydantic-settings
|
pydantic-settings
|
||||||
|
|||||||
@ -11,6 +11,9 @@ from webapi.providers import database
|
|||||||
from webapi.providers import exception_handler
|
from webapi.providers import exception_handler
|
||||||
from .freeleaps_app import FreeleapsApp
|
from .freeleaps_app import FreeleapsApp
|
||||||
|
|
||||||
|
# prometheus
|
||||||
|
from prometheus_fastapi_instrumentator import Instrumentator
|
||||||
|
|
||||||
|
|
||||||
def create_app() -> FastAPI:
|
def create_app() -> FastAPI:
|
||||||
logging.info("App initializing")
|
logging.info("App initializing")
|
||||||
@ -26,6 +29,8 @@ def create_app() -> FastAPI:
|
|||||||
|
|
||||||
# Call the custom_openapi function to change the OpenAPI version
|
# Call the custom_openapi function to change the OpenAPI version
|
||||||
customize_openapi_security(app)
|
customize_openapi_security(app)
|
||||||
|
# expose prometheus metrics
|
||||||
|
Instrumentator().instrument(app).expose(app)
|
||||||
return app
|
return app
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user