Skip to content

πŸ¦‹ New version release - #5

Merged
brentrager merged 1 commit into
mainfrom
changeset-release/main
May 18, 2026
Merged

πŸ¦‹ New version release#5
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/observability@0.3.0

Minor Changes

  • bd64532: Node SDK capture handlers + Hono middleware (SMOODEV-1067 follow-up th-bafeb7).

    @smooai/observability/node now ships real implementations:

    • registerNodeGlobalHandlers({ flush, exitOnUncaught }) β€” attaches uncaughtException + unhandledRejection listeners that forward to Client.captureException, plus optional SIGTERM / SIGINT / beforeExit flushing so a Lambda container shutdown drains the in-memory queue. Idempotent.

    • makeNodeTransport(options) β€” Node-flavored Transport adapter (fetch + keepalive, no Beacon). Returns the underlying transport so callers (and the auto-init wiring) can hook the flush method into the lifecycle.

    • observabilityMiddleware({ resolveUser, requestHeaderAllowlist }) β€” Hono-shaped middleware. Per request: hydrates the active Scope with the authenticated user (defaults to reading c.get('auth') produced by @smooai/auth), adds a request context with method/path and an allow-listed header subset, wraps the handler chain in withScope so any captureException fired from a downstream handler picks up that request's identity, and captures thrown errors before re-throwing so Hono's onError still gets to render the response.

    • Client.init on node now auto-wires the transport and global handlers (override with autoInstrumentation: false).

      Also fixed a latent bug in withScope: previously the scope was popped before any await inside the callback resolved, so request-scoped state was gone by the time async handlers ran. withScope now defers the pop until a returned thenable settles, while keeping the synchronous fast path unchanged.

      24 tests total (was 13). Build + typecheck clean.

Patch Changes

  • 2d2eed7: @smooai/observability-otel β€” OpenTelemetry foundation (SMOODEV-1067c Phase 1).

    New package wraps @opentelemetry/sdk-node + @opentelemetry/auto-instrumentations-node + the OTLP/HTTP trace exporter, and bridges the core Client so every captureException records on the active OTel span with SpanStatusCode.ERROR. Works without @smooai/logger β€” pipes correlation IDs through @opentelemetry/api's ambient context, so any logger / framework that integrates with OTel sees the same trace-id flowing through logs, traces, and Smoo error groups.

    Public surface:

    • setupOtelSdk({ serviceName, otlpEndpoint, otlpHeaders, environment, release, instrumentationConfig }) β€” idempotent Lambda / Node bootstrap. Returns { sdk, flush, shutdown }.

    • bridgeClientToOtel() β€” wraps Client.captureException / setUser / setTag to also update OTel span attributes + status. Idempotent.

    • readOtelCorrelation() β€” read-only view of the active span's traceId / spanId / sampled flag.

      Also patches @smooai/observability core docs reference; no API change.

      12 tests (bridge + setup), typecheck + build clean.

@smooai/observability-otel@0.2.0

Minor Changes

  • 2d2eed7: @smooai/observability-otel β€” OpenTelemetry foundation (SMOODEV-1067c Phase 1).

    New package wraps @opentelemetry/sdk-node + @opentelemetry/auto-instrumentations-node + the OTLP/HTTP trace exporter, and bridges the core Client so every captureException records on the active OTel span with SpanStatusCode.ERROR. Works without @smooai/logger β€” pipes correlation IDs through @opentelemetry/api's ambient context, so any logger / framework that integrates with OTel sees the same trace-id flowing through logs, traces, and Smoo error groups.

    Public surface:

    • setupOtelSdk({ serviceName, otlpEndpoint, otlpHeaders, environment, release, instrumentationConfig }) β€” idempotent Lambda / Node bootstrap. Returns { sdk, flush, shutdown }.

    • bridgeClientToOtel() β€” wraps Client.captureException / setUser / setTag to also update OTel span attributes + status. Idempotent.

    • readOtelCorrelation() β€” read-only view of the active span's traceId / spanId / sampled flag.

      Also patches @smooai/observability core docs reference; no API change.

      12 tests (bridge + setup), typecheck + build clean.

Patch Changes

  • Updated dependencies [bd64532]
  • Updated dependencies [2d2eed7]
    • @smooai/observability@0.3.0

@smooai/observability-next@0.3.0

Patch Changes

  • Updated dependencies [bd64532]
  • Updated dependencies [2d2eed7]
    • @smooai/observability@0.3.0
    • @smooai/observability-react@0.3.0

@smooai/observability-react@0.3.0

Patch Changes

  • Updated dependencies [bd64532]
  • Updated dependencies [2d2eed7]
    • @smooai/observability@0.3.0

@brentrager
brentrager force-pushed the changeset-release/main branch from 821ebf5 to 3efefde Compare May 18, 2026 14:09
@brentrager
brentrager merged commit c3a37af into main May 18, 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