Repository navigation
feat(dynalogs): structured logs per-run / per-node with secret redaction (#300) - #333
Conversation
…ction (codeforstartups#300) - Add RunLogRecord model with lossless serialization and recursive secret redaction - Add run_context and node_context managers with contextvars for automatic correlation - Support pluggable sinks: StdoutSink, InMemoryLogSink, and DynamoDBLogSink - Enhance secret redaction for API tokens, bearer tokens, private keys, and exception traces while preserving AI token count metrics - Add comprehensive unit test suite in tests/test_run_logging.py
|
Reviewed — strong dynalogs foundation (closes #300). 🎯
All 4 CI checks green incl. strict mypy. This is the first dynalogs pillar piece to land — nicely done @shivamm-gupta! Natural next steps on top of this: #299 (span tree) and #301 (run history). Merging. |
Description
Closes #300
Implements structured, queryable logs at run and node granularity under the dynalogs pillar, building on dynavec's opt-in structured logging and secret redaction (#200).
Changes
Structured Models & Serialization:
un_id,
ode_id, \span_id), severity level, messages, contextual metadata dictionaries, and exception tracebacks.
Context Propagation & Automatic Correlation:
un_context(run_id=...)\ and
ode_context(node_id=..., span_id=...)\ context managers leveraging \contextvars\ for async and threaded context isolation.
Secret Redaction Enhancements:
Pluggable Sinks:
Ergonomic Logging API:
Verification
uff check\ and
uff format.