services are checked
This commit is contained in:
@@ -12,6 +12,7 @@ from handlers_exception import (
|
||||
from prometheus_fastapi_instrumentator import Instrumentator
|
||||
from prometheus_client import Counter, Histogram
|
||||
|
||||
from service_app.app_runner_init import create_endpoints_from_api_functions
|
||||
|
||||
app = create_app()
|
||||
Instrumentator().instrument(app=app).expose(app=app)
|
||||
@@ -23,12 +24,13 @@ app.add_middleware(
|
||||
"allow_credentials": True,
|
||||
"allow_methods": ["*"],
|
||||
"allow_headers": ["*"],
|
||||
}
|
||||
},
|
||||
)
|
||||
app.add_middleware(AuthHeaderMiddleware)
|
||||
|
||||
app.add_exception_handler(HTTPException, exception_handler_http)
|
||||
app.add_exception_handler(Exception, exception_handler_exception)
|
||||
create_endpoints_from_api_functions(api_app=app)
|
||||
|
||||
# # Define a counter metric
|
||||
# REQUESTS_COUNT = Counter(
|
||||
|
||||
Reference in New Issue
Block a user