feat(deno): add anthropic integration#22468
Conversation
fcdda49 to
6581776
Compare
9ea3b80 to
247a3be
Compare
6581776 to
40c51ca
Compare
247a3be to
166b082
Compare
| Deno.test('anthropic instrumentation: orchestrion @anthropic-ai/sdk:chat channel produces a nested gen_ai span', async () => { | ||
| resetGlobals(); | ||
| const sink = transactionSink(); | ||
| init({ |
There was a problem hiding this comment.
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.
40c51ca to
3e3e6d2
Compare
166b082 to
1b4d06d
Compare
3e3e6d2 to
fd6c438
Compare
1b4d06d to
6fd91f7
Compare
fd6c438 to
126e75d
Compare
6fd91f7 to
c6b3064
Compare
c6b3064 to
fb817bc
Compare
126e75d to
4c7f4ea
Compare
size-limit report 📦
|

No description provided.