Files
template-fastapi/deploy/configs/api.yaml.jinja
Aleksei Sokol 53f14a8624
All checks were successful
Run linters on applied template / Python 3.13 lint and build (push) Successful in 1m40s
Version 0.4.0
Changes:
- put ObservabilityMiddleware before ExceptionHandlerMiddleware to avoid repetative code
- add application startup and last metrics update metrics along with CPU usage metric and threads count
- move host and port to new uvicorn section at config along with new reload and forwarded_allow_ips
- add request_id and remove trace_id/span_id generation if tracing is disabled
- move logging logic from utils to observability
- pass trace_id/span_id in HEX form
2026-01-03 16:29:58 +03:00

34 lines
627 B
Django/Jinja

app:
uvicorn:
host: 0.0.0.0
port: 8080
reload: true
forwarded_allow_ips:
- 127.0.0.1
debug: true
cors:
allow_origins: ["*"]
allow_methods: ["*"]
allow_headers: ["*"]
allow_credentials: True
db:
master:
host: {{project_slug}}_db
port: 5432
database: {{project_slug}}_db
user: postgres
password: "!env(DB_PASSWORD)"
pool_size: 2
observability:
logging:
level: INFO
exporter:
endpoint: http://otel:4317
level: INFO
tls_insecure: true
prometheus:
host: 0.0.0.0
port: 9090
jaeger:
endpoint: http://otel:4318/v1/traces