DynamoGuard Logs
- DynamoGuard analyze requests flow from the API through the Moderation Server to Model calls
- This document covers how to trace logs for a single analyze call request across all components in the request flow
Request Flow and Logging
When the API makes an analyze request, the request flows through multiple components:
- API receives the analyze request and generates a request ID (from
rTracer.id()) - API sends the request to Moderation Server with
X-Request-IDheader containing the API's request ID - Moderation Server receives this request ID and uses it as
trace_idin its logs - A single API analyze call can result in multiple calls to the Moderation Server
- Each Moderation Server call generates its own
worker_request_id(unique UUID) while maintaining the sametrace_id(API request ID) - Moderation Server makes calls to Models with
X-Request-IDheader (using the same value fromcorrelation_id) - Models receive the
X-Request-IDand bind it torequest_idin their logs
Request Flow Diagram
┌─────────┐
│ Client │
└────┬────┘
│ Analyze Request
▼
┌─────────────────────────────────────────────────────────────┐
│ API │
│ Generates: request_id = "abc-123-def" │