mirror of
https://github.com/flibusta-apps/telegram_files_cache_server.git
synced 2025-12-06 14:45:36 +01:00
Add metrics
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
from fastapi import FastAPI
|
||||
|
||||
from prometheus_fastapi_instrumentator import Instrumentator
|
||||
|
||||
from app.views import router
|
||||
from core.arq_pool import get_arq_pool
|
||||
from core.db import database
|
||||
@@ -26,4 +28,6 @@ def start_app() -> FastAPI:
|
||||
if database_.is_connected:
|
||||
await database_.disconnect()
|
||||
|
||||
Instrumentator().instrument(app).expose(app, include_in_schema=True)
|
||||
|
||||
return app
|
||||
|
||||
Reference in New Issue
Block a user