Skip to content

v0.4.0 — events API safety

Choose a tag to compare

@heysamtexas heysamtexas released this 11 Jun 01:10
· 4 commits to main since this release
96ea325

Makes the typed-events API safe to recommend for high-value and error-path events. Fully additive at call sites; one prod-mode behavior change (lenient mode no longer drops events).

uv add "git+https://github.com/collide-ai/collide-logging-py.git@v0.4.0"

Fixed

  • #36 — lenient mode no longer discards the offending event. Under COLLIDE_LOG_VALIDATE=lenient a violation previously dropped the whole payload and emitted only a meta-event — events vanished during incidents. Now the event is emitted best-effort under its real name (unknown fields dropped, known fields redacted, a _schema_violation marker added), with the collide_logging.schema_violation meta-event alongside as an alertable signal. raise mode unchanged.

Added

  • #33 — CollideLogger.event() accepts level= and exc_info=. Schema-validated error-path events can emit at warning/error/etc. and carry a traceback. Defaults leave the happy-path record byte-identical.
  • #35 — public digest_value(). Exposes the {"len", "sha256"} digest behind FieldSpec(redact=True) for hand-curated redaction of sensitive free-text on the plain log.info(...) path. Auto-redaction remains name-based only.

Upgrading

No call-site changes required. Services on lenient should confirm an alert on event="collide_logging.schema_violation". Avoid declaring an event field named _schema_violation — now reserved.

Follow-up: #37 (unrecognized COLLIDE_LOG_VALIDATE values fall back to raise-mode).