fix(node): re-export GenAI helpers from node entry - #29
Merged
Conversation
The node entry was missing re-exports for setGenAIAttributes, recordGenAIMessage, and the GenAI types (GenAIAttributes, GenAIOperationName, GenAISystem). Since '@smooai/observability' resolves to ./dist/node.mjs in Node via the 'node' conditional export, consumers importing these helpers from the bare package name failed to build with 'No matching export in node.mjs for import setGenAIAttributes'. Mirrors the exports already present in src/index.ts.
🦋 Changeset detectedLatest commit: ec16ab4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
brentrager
added a commit
that referenced
this pull request
Jun 21, 2026
…ansport (not raw reqwest) (#61) auth.rs (M2M token mint) and transport.rs (webhook event delivery) now go through smooai-fetch (retries/timeouts/circuit-breaking). reqwest kept only for the OTLP exporter (opentelemetry-http HttpClient coupling) and the reqwest_mw integration helper — documented per Code-Conventions #29. fmt+clippy(--all-features)+test green. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
brentrager
added a commit
that referenced
this pull request
Jun 21, 2026
…OTLP where feasible) The batched webhook event delivery now goes through smooai-fetch (retries/timeouts/circuit-breaking) instead of raw httpx. smooai-fetch is async-only, so the transport's daemon worker thread owns a private asyncio loop and drives fetch() via run_until_complete; the host loop is never touched. The fetch call is injectable (fetch_fn) because smooai-fetch constructs its own httpx.AsyncClient with no client-injection seam — tests substitute an async stub. smooai-fetch requires Python >=3.12, so the SDK floor bumps from >=3.10 to >=3.12 (ruff target-version py312, uv.lock drops cp310/cp311 wheels). OTLP exporter (secondary) deferred: opentelemetry-exporter-otlp-proto-http is coupled to a sync requests.Session and owns protobuf serialization + its own retry loop. Backing it with async smooai-fetch would mean reimplementing that encoding/retry surface — the same reason the Rust SDK kept reqwest for OTLP (#61, Code-Conventions #29). Deferred cleanly rather than hacked; no double-retry layer introduced. The OAuth token provider keeps httpx for the same reason (it backs the OTLP path). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
brentrager
added a commit
that referenced
this pull request
Jun 21, 2026
…s Python floor to 3.12) (#64) * SMOODEV-2026: Python observability SDK transport via smooai-fetch (+ OTLP where feasible) The batched webhook event delivery now goes through smooai-fetch (retries/timeouts/circuit-breaking) instead of raw httpx. smooai-fetch is async-only, so the transport's daemon worker thread owns a private asyncio loop and drives fetch() via run_until_complete; the host loop is never touched. The fetch call is injectable (fetch_fn) because smooai-fetch constructs its own httpx.AsyncClient with no client-injection seam — tests substitute an async stub. smooai-fetch requires Python >=3.12, so the SDK floor bumps from >=3.10 to >=3.12 (ruff target-version py312, uv.lock drops cp310/cp311 wheels). OTLP exporter (secondary) deferred: opentelemetry-exporter-otlp-proto-http is coupled to a sync requests.Session and owns protobuf serialization + its own retry loop. Backing it with async smooai-fetch would mean reimplementing that encoding/retry surface — the same reason the Rust SDK kept reqwest for OTLP (#61, Code-Conventions #29). Deferred cleanly rather than hacked; no double-retry layer introduced. The OAuth token provider keeps httpx for the same reason (it backs the OTLP path). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * SMOODEV-2026: PEP 695 generic for run_with_scope (ruff UP047 under py312 floor) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The node entry (
packages/core/src/node/index.ts) was missing re-exports forsetGenAIAttributes,recordGenAIMessage,GenAIAttributes,GenAIOperationName, andGenAISystem.Since
@smooai/observabilityresolves to./dist/node.mjsin Node via the"node"conditional export, consumers importing these helpers from the bare package name fail to build:Two consecutive smooai prod deploys failed on this (workflow runs
26322401458,26334390802).Fix
Add the missing re-exports from
../gen-ai-attributestopackages/core/src/node/index.ts, mirroring the exports already present inpackages/core/src/index.ts:11.Test plan
pnpm --filter @smooai/observability buildsucceedsgrep "setGenAIAttributes" packages/core/dist/node.mjsmatchespnpm --filter @smooai/observability test— all 53 tests pass@smooai/observabilitypatch → 0.10.1