Skip to content

πŸ¦‹ New version release - #4

Merged
brentrager merged 1 commit into
mainfrom
changeset-release/main
Aug 15, 2026
Merged

πŸ¦‹ New version release#4
brentrager merged 1 commit into
mainfrom
changeset-release/main

Conversation

@brentrager

Copy link
Copy Markdown
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@smooai/audit@0.2.0

Minor Changes

  • f05a9ab: Trace correlation: an emitted audit event now carries the W3C trace context of the
    request that caused it, so a row in the audit store can be joined to a trace.

    The ids ride in the ENVELOPE, never inside the event. The wire body is now
    {"event":<the sealed event>,"spanId":"…","traceId":"…"}. The bytes under
    "event" are exactly the bytes that were hashed β€” unchanged, byte-for-byte, with
    or without a trace active β€” because hashCurrent covers canonical-JSON(event
    minus hashCurrent) and any new event field would invalidate every stored chain
    and every fixture in spec/parity-corpus.json. The corpus is untouched, and each
    language asserts it inside an active span as well as outside one. Both ids are
    OMITTED when there is no valid span: never "", never an all-zero id.

    TypeScript: AuditClient.emit(event, trace?) captures the active context at
    emit time behind an optional @opentelemetry/api peer dependency. Without it
    installed (or without a registered SDK) it is a no-op, not a crash. buildEnvelope
    / currentTraceContext are exported for consumers on their own transport.

    Rust: the same, behind a new optional otel cargo feature (off by default β€”
    the crate does not link OpenTelemetry unless you ask for it). AuditClient::emit
    uses the ambient span; emit_with_trace takes an explicit TraceContext that
    wins per field. TraceContext::current() reads both context homes β€” a tracing
    span via tracing-opentelemetry and an OTel-native one β€” because neither falls
    back to the other.

    Go: AuditClient.Emit(ctx, event) reads the span context already on the ctx it
    takes (trace.SpanContextFromContext(ctx).IsValid() before touching the ids), via
    the OpenTelemetry trace API only β€” no SDK, no exporter. Pinned to otel v1.35.0,
    the newest release whose go directive (1.22.0) still builds on the Go 1.22 the
    CI matrix pins; v1.36+ declare go 1.23.

    Python: the ids come from the ambient span behind a guarded
    from opentelemetry import trace import, exposed as the optional otel extra
    (pip install smooai-audit[otel]). Without it installed, correlation is a no-op β€”
    opentelemetry-api is never a hard dependency.

    .NET: reads Activity.Current β€” the BCL type the OpenTelemetry .NET SDK itself
    populates β€” so no new package reference. Non-W3C or unstarted activities report
    nothing.

@brentrager
brentrager force-pushed the changeset-release/main branch from 245ca17 to da92d8d Compare August 15, 2026 03:06
@brentrager
brentrager merged commit 7fe7a2a into main Aug 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant