Overview
- DynamoAI components write structured application logs to standard output. Any log collector that reads Kubernetes container logs can send them to the backend of your choice.
- This document covers the core logging concepts and structure used by DynamoAI components, which are independent of your chosen logging backend.
Log Collection Architecture
- DynamoAI components write logs to standard output; the DynamoAI chart does not install a log collector
- In SaaS deployments: Logs are automatically exported to AWS CloudWatch
- In PaaS deployments: Use the collector you already run, such as Fluent Bit, Fluentd, or the OpenTelemetry Collector, to send logs to any backend (CloudWatch, Elasticsearch, Splunk, etc.). For DynamoGuard moderation decisions, see Send DynamoGuard Moderation Logs To A SIEM.
Structured Logging
DynamoAI uses structured logging across its components. Instead of printing logs as plain strings, logs are emitted as JSON objects with consistent attributes. This enables:
- Easy filtering and querying based on metadata attributes
- Simplified log exploration and debugging
- Backend-agnostic log analysis (works with any logging system that supports JSON)
Benefits
- Filter logs by specific attributes (e.g., request ID, component, test ID) rather than searching through log text
- Consistent log structure across all DynamoAI components
- Better integration with modern logging backends and analysis tools
Component Logging Documentation
- DynamoEval Logs: Logging structure for DynamoEval attacks and test report generation
- Generic Component Logs: Logging structure for API, UI, and MongoDB components
- DynamoGuard Logs: How to trace logs for DynamoGuard analyze requests from API to Moderation Server
- CloudWatch Guide: CloudWatch-specific implementation details and query examples (for SaaS deployments or if using CloudWatch as your backend)
- Send DynamoGuard Moderation Logs To A SIEM: Collect moderation decisions from the API's standard output, with a Splunk example
- Moderation Log Record: Fields of the moderation log line
- Pull Moderation Logs From The API: Backfill history from the logs API, with a reference poller