Skip to content

feat(telemetry): enable OpenAI auto-instrumentation and streaming gen_ai spans#371

Open
constantinius wants to merge 4 commits into
mainfrom
feat/improve-gen-ai-telemetry
Open

feat(telemetry): enable OpenAI auto-instrumentation and streaming gen_ai spans#371
constantinius wants to merge 4 commits into
mainfrom
feat/improve-gen-ai-telemetry

Merge remote-tracking branch 'origin/main' into feat/improve-gen-ai-t…

b1a4167
Select commit
Loading
Failed to load commit list.
@sentry/warden / warden: code-review completed Jun 9, 2026 in 1m 8s

1 issue

code-review: Found 1 issue (1 medium)

Medium

Missing `openAIIntegration` mock makes all `loadInitializedSentry()` tests throw TypeError - `packages/warden/src/sentry.ts:35`

The @sentry/node mock in sentry.test.ts does not define openAIIntegration, so initSentry evaluating Sentry.openAIIntegration(...) throws TypeError: Sentry.openAIIntegration is not a function, crashing every test that calls loadInitializedSentry(). Add openAIIntegration: vi.fn(() => ({ name: 'openai' })) to the mock.


⏱ 41.6s · 92.4k in / 3.7k out · $0.24

Annotations

Check warning on line 35 in packages/warden/src/sentry.ts

See this annotation in the file changed.

@sentry-warden sentry-warden / warden: code-review

Missing `openAIIntegration` mock makes all `loadInitializedSentry()` tests throw TypeError

The `@sentry/node` mock in `sentry.test.ts` does not define `openAIIntegration`, so `initSentry` evaluating `Sentry.openAIIntegration(...)` throws `TypeError: Sentry.openAIIntegration is not a function`, crashing every test that calls `loadInitializedSentry()`. Add `openAIIntegration: vi.fn(() => ({ name: 'openai' }))` to the mock.