Add correlation ID and structured logging
Allow tracing through the system by using correlation id.
Clients have to send an ID via a header, e.g. X-Correlation-ID
. Servers have to pick this up (middleware) and attach it to all subsequent log entries.
Probably it's nice to use something like structlog for this.
django-structlog has some support for this, maybe there's also something for fastapi, but it's probably also doable to implement it ourselves.