Skip to content

feat(deno): add anthropic integration#22468

Open
isaacs wants to merge 1 commit into
isaacs/deno-orchestrion-integrations-openaifrom
isaacs/deno-orchestrion-integrations-anthropic
Open

feat(deno): add anthropic integration#22468
isaacs wants to merge 1 commit into
isaacs/deno-orchestrion-integrations-openaifrom
isaacs/deno-orchestrion-integrations-anthropic

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:25
@isaacs
isaacs requested review from JPeer264 and andreiborza and removed request for a team July 21, 2026 20:25
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-anthropic branch from fcdda49 to 6581776 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-openai branch from 9ea3b80 to 247a3be Compare July 21, 2026 20:55
@isaacs

isaacs commented Jul 21, 2026

Copy link
Copy Markdown
Member Author
IMG_3759

🤖😂

@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-anthropic branch from 6581776 to 40c51ca Compare July 21, 2026 21:31
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-openai branch from 247a3be to 166b082 Compare July 21, 2026 21:31
Comment on lines +69 to +72
Deno.test('anthropic instrumentation: orchestrion @anthropic-ai/sdk:chat 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: Deno integration tests fail to reset the global installedIntegrations array, causing subsequent tests in the same file to skip crucial setupOnce() logic and fail.
Severity: MEDIUM

Suggested Fix

Update the resetGlobals() function used in the Deno integration test suites to also clear the installedIntegrations array from @sentry/core. This can be achieved by adding installedIntegrations.splice(0, installedIntegrations.length), ensuring each test runs with a clean integration state and setupOnce() is called correctly.

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-anthropic/test.ts#L69-L72

Potential issue: The global `installedIntegrations` array is not reset between Deno
integration tests that run within the same file. When the first test initializes an
integration, it adds its name to this array. A subsequent test in the same file will
then skip the integration's `setupOnce()` function because the core `setupIntegration()`
logic sees the integration as already installed. This prevents necessary setup, such as
subscribing to channels, from occurring in the second test, causing it to fail when it
expects behavior configured in `setupOnce()`.

Also affects:

  • dev-packages/deno-integration-tests/suites/orchestrion-anthropic/test.ts:57~62

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

@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-anthropic branch from 40c51ca to 3e3e6d2 Compare July 21, 2026 21:43
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-openai branch from 166b082 to 1b4d06d 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