Skip to main content
TealAudit provides comprehensive audit logging with versioned events and security-by-default redaction.

Overview

TealAudit enables:
  • Versioned audit events with stable schema
  • Security-by-default redaction (never logs raw prompts/responses)
  • Context propagation for end-to-end traceability
  • Multiple output targets (console, file, custom)

Class

Configuration

Creating an Audit Logger

Basic Configuration

Multiple Outputs

Debug Mode (Development Only)

Logging Events

Basic Event Logging

With Context Propagation

Logging Decisions

Querying Events

Query by Correlation ID

Query by Time Range

Query by Cost

Query by Agent

Exporting Events

JSON Export

CSV Export

Context Propagation

Manual Context Propagation

Redaction Levels

HASH (Default)

REDACT

NONE (Debug Only)

Custom Redaction Rules

Integration with TealEngine

Performance

TealAudit targets:
  • < 1ms per log operation (p99, async writes)
  • < 0.5ms for context propagation (p99)
  • Non-blocking (never blocks application flow)

Best Practices

Always Use Redaction in Production

Propagate Context

Query by Correlation ID