feat(health): expose app version in GET /health
Surface the deployed app version (app.version, = pyproject 0.1.0) in the health response for observability. Reuses the FastAPI instance attribute — no new settings field, no runtime pyproject parsing. Refs #717
This commit is contained in:
parent
0e2bba78b7
commit
d07d10f1df
1 changed files with 5 additions and 1 deletions
|
|
@ -172,4 +172,8 @@ app.include_router(ping.router, prefix="/api/v1", tags=["ping"])
|
||||||
|
|
||||||
@app.get("/health")
|
@app.get("/health")
|
||||||
async def health() -> dict[str, str]:
|
async def health() -> dict[str, str]:
|
||||||
return {"status": "ok", "environment": settings.environment}
|
return {
|
||||||
|
"status": "ok",
|
||||||
|
"environment": settings.environment,
|
||||||
|
"version": app.version,
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue