Overview
Moss records audit events and supports optional detailed request logging for compliance and security investigations.What Gets Logged
The tables below describe detailed request logs when enabled.Inbound Requests (SDK to Backend)
Outbound Requests (Backend to External Services)
Sensitive Data Redaction
The request-log sanitizer redacts the following credential fields before storage:Redacted Fields
The following fields are automatically redacted:api_key,apiKeyauthorizationpasswordsecrettokenx-api-key
Redaction Example
Credential fields are redacted recursively. Detailed request logging covers
instrumented paths.
Per-Application Control
Detailed request logging can be enabled or disabled per application: This setting controls detailed request logs, separately from administrative audit events.Dashboard Configuration
Navigate to Settings > Developer Options > Audit Logging to enable or disable logging for your application.Considerations
Accessing Audit Logs
Dashboard Access
View audit logs in the Dashboard under Configure > Audit Log. Features:- Filter by date range
- Filter by user or session
- Filter by endpoint or status
- Export to CSV
API Access
Query audit logs programmatically using the Audit API:page and page_size, and can be narrowed with actor_id, action, target_type, outcome, start_date, and end_date.
Audit API Key
A separate API key is used for audit log access:- Isolated Access - Audit key is separate from SDK API key
- Read-Only - Cannot modify logs or other data
- Revocable - Can be revoked independently
Log Retention
Applicable agreements, documented customer instructions, and lawful preservation
requirements determine the deployed schedule. A required minimum must be
reconciled with an expiry period before deletion. Confirm the active schedule
for your deployment with Moss.
Use Cases
Compliance Reporting
Generate reports for auditors:- Filter logs by date range
- Export to CSV
- Include in compliance documentation
Security Investigation
Investigate suspicious activity:- Identify the user or session
- Review all related requests
- Check for anomalous patterns
- Export evidence for incident response
Performance Analysis
Analyze API usage patterns:- Review request durations
- Identify slow endpoints
- Track LLM token usage
- Optimize based on data
Cost Analysis
Track LLM usage costs:- Review token counts per model
- Identify high-usage sessions
- Optimize prompts and context
Log Integrity
Append-Only Audit Events
- Application users cannot edit or delete existing audit events through the dashboard or Audit API.
- The retention process removes expired audit events.
Timestamps
Audit-event timestamps are generated by the server in UTC.Best Practices
Enable for Production
Configure production audit and request logging to:- Meet compliance requirements
- Enable incident investigation
- Track usage patterns
Regular Review
Periodically review audit logs for:- Unusual access patterns
- Access changes and recorded security events
- Unexpected API usage
Secure API Keys
Protect your Audit API key:- Store securely (not in code)
- Rotate periodically
- Monitor for unauthorized use
Next Steps
Compliance
GDPR, data deletion, and certifications
Authentication
Secure your SDK integration