Skip to content

feat: add optional AI observability - #24

Merged
kauandotnet merged 1 commit into
mainfrom
codex/observability-migration
Aug 23, 2026
Merged

kauandotnet merged 1 commit into
mainfrom
codex/observability-migration

Conversation

@kauandotnet

Copy link
Copy Markdown
Contributor

Summary

  • migrate the validated observability capability from nestm/ai-observability at source commit 9cde1e1
  • add lazy @nestm/ai-sdk/observability, /core, /http, and /testing entrypoints
  • add an explicit AiSdkObservabilityModule, separately registered AI SDK telemetry bridge, strict v1 events/snapshots, bounded aggregation, read-only HTTP projection, and deterministic testing utilities
  • update documentation, exports, build configuration, CI, packed-consumer checks, and Changesets for AI SDK 7 compatibility

Architecture and boundaries

Observability remains an optional capability of @nestm/ai-sdk: it is never enabled automatically, and the root import stays lean and side-effect free.

The core entrypoint remains framework-neutral, the HTTP layer remains platform-neutral, and OpenAI, Anthropic, and Google SDKs remain private workspace dependencies rather than published package dependencies.

The dashboard and playground are private workspace apps excluded from package exports, dist, and published files. No Sites integration, deployment configuration, credentials, or real .env.local files are included.

Privacy and private apps

The strict contracts reject and never snapshot prompts, outputs, reasoning, tool content, headers, provider metadata, raw errors, user IDs, or tenant IDs. Aggregation, replay tracking, active entities, dimensions, and late corrections are bounded.

The private dashboard validates snapshot schemas and preserves the last valid snapshot. The loopback-only playground configures AiSdkModule and runs model comparisons through AiSdkService.generateText, with isolated partial provider failures and sanitized error categories.

Validation

Area Result
Full repository verification pnpm run verify passed
Package tests 130 unit, 10 Express, and 10 Fastify tests passed
Package boundaries Build, packed types, strict Publint, ATTW, package checks, and 53-file dry-run pack passed
Dashboard 31 tests, production build, and loopback smoke passed
Playground 12 tests, build, and loopback smoke passed
Structural checks Frozen lockfile, example build, and circular dependency checks passed

Release

Includes a minor Changesets entry and remains on the configured alpha prerelease channel.

@kauandotnet
kauandotnet merged commit ec6ce7f into main Aug 23, 2026
8 checks passed
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