Skip to content

feat(deno): add google-genai integration#22469

Open
isaacs wants to merge 1 commit into
isaacs/deno-orchestrion-integrations-anthropicfrom
isaacs/deno-orchestrion-integrations-google-genai
Open

feat(deno): add google-genai integration#22469
isaacs wants to merge 1 commit into
isaacs/deno-orchestrion-integrations-anthropicfrom
isaacs/deno-orchestrion-integrations-google-genai

Conversation

@isaacs

@isaacs isaacs commented Jul 21, 2026

Copy link
Copy Markdown
Member

No description provided.

@isaacs
isaacs requested a review from a team as a code owner July 21, 2026 20:30
@isaacs
isaacs requested review from JPeer264 and andreiborza and removed request for a team July 21, 2026 20:30
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-google-genai branch from a3bda7b to af2805c Compare July 21, 2026 20:55
@isaacs
isaacs requested a review from a team as a code owner July 21, 2026 20:55
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-anthropic branch from fcdda49 to 6581776 Compare July 21, 2026 20:55
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-google-genai branch from af2805c to 46512ae Compare July 21, 2026 21:31
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-anthropic branch from 6581776 to 40c51ca Compare July 21, 2026 21:31
Comment on lines +69 to +72
Deno.test('google-genai instrumentation: orchestrion @google/genai:generate-content channel produces a nested gen_ai span', async () => {
resetGlobals();
const sink = transactionSink();
init({

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: A module-level installedIntegrations array is not cleared between tests, causing subsequent init() calls to skip setup and leading to test failures.
Severity: MEDIUM

Suggested Fix

The installedIntegrations array should be cleared between tests. This can be done by exporting a reset function from @sentry/core that clears the array and then calling this new function within resetGlobals(). This will ensure each test runs in a clean state.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location:
dev-packages/deno-integration-tests/suites/orchestrion-google-genai/test.ts#L69-L72

Potential issue: A module-level array, `installedIntegrations`, is not cleared between
tests, even when `resetGlobals()` is called. When a second test in the same file calls
`init()`, the integration's `setupOnce()` function is skipped because the integration
name is already present in the array from the first test's execution. This prevents
diagnostic channel subscriptions from being set up for the second test. Consequently,
the test times out waiting for a transaction that is never created, causing a test
failure.

Also affects:

  • packages/core/src/integration.ts:10
  • packages/core/src/integration.ts:117~119

Did we get this right? 👍 / 👎 to inform future reviews.

@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-google-genai branch from 46512ae to 46e8ba9 Compare July 21, 2026 21:42
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-anthropic branch from 40c51ca to 3e3e6d2 Compare July 21, 2026 21:43
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