Skip to main content

Module diagnostics

Module diagnostics 

Source
Expand description

Diagnostic logging system for Ralph orchestration.

Captures agent output, orchestration decisions, traces, performance metrics, and errors to structured JSONL files when RALPH_DIAGNOSTICS=1 is set.

Structs§

AgentOutputEntry
Single agent output entry in JSONL format.
AgentOutputLogger
Logger for agent output events.
DiagnosticStreamHandler
Wrapper that logs agent output while delegating to inner handler.
DiagnosticTraceLayer
DiagnosticsCollector
Central coordinator for diagnostic logging.
ErrorLogger
HookRunLogger
JSONL writer for hook invocation telemetry (hook-runs.jsonl).
HookRunTelemetryEntry
Structured diagnostics record persisted for each hook invocation.
OrchestrationLogger
PerformanceLogger
TraceEntry

Enums§

AgentOutputContent
Types of agent output content.
DiagnosticError
HookDisposition
Final outcome category for a hook invocation.
OrchestrationEvent
PerformanceMetric

Functions§

create_log_file
Creates a new timestamped log file in .ralph/diagnostics/logs/.
rotate_logs
Rotates log files in the given directory, keeping at most max_files entries.