[feat] wire observability into app
This commit is contained in:
parent
741e63e978
commit
0c55329769
4 changed files with 20 additions and 19 deletions
|
|
@ -13,6 +13,6 @@ def create_app(config: AppConfig | None = None) -> FastAPI:
|
|||
app_config = load_config() if config is None else config
|
||||
app = FastAPI(title=app_config.app.name, lifespan=app_lifespan)
|
||||
setattr(app.state, APP_CONFIG_STATE, app_config)
|
||||
register_middleware(app)
|
||||
register_middleware(app, app_config)
|
||||
app.include_router(v1_router, prefix=API_V1_PREFIX)
|
||||
return app
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue