Skip to content

Commit f79f878

Browse files
committed
thank you lukas
1 parent 78adfa8 commit f79f878

File tree

3 files changed

+6
-15
lines changed

3 files changed

+6
-15
lines changed
Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import * as Sentry from '@sentry/browser';
1+
import { instrumentAnthropicAiClient } from '@sentry/browser';
22
import { MockAnthropic } from './mocks.js';
33

44
const mockClient = new MockAnthropic({
55
apiKey: 'mock-api-key',
66
});
77

8-
const client = Sentry.instrumentAnthropicAiClient(mockClient);
8+
const client = instrumentAnthropicAiClient(mockClient);
99

1010
// Test that manual instrumentation doesn't crash the browser
1111
// The instrumentation automatically creates spans
@@ -17,6 +17,3 @@ const response = await client.messages.create({
1717
});
1818

1919
console.log("Received response", response)
20-
21-
// Ensure transaction is flushed in CI
22-
await Sentry.flush(2000);

dev-packages/browser-integration-tests/suites/tracing/ai-providers/google-genai/subject.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import * as Sentry from '@sentry/browser';
1+
import { instrumentGoogleGenAIClient } from '@sentry/browser';
22
import { MockGoogleGenAI } from './mocks.js';
33

44
const mockClient = new MockGoogleGenAI({
55
apiKey: 'mock-api-key',
66
});
77

8-
const client = Sentry.instrumentGoogleGenAIClient(mockClient);
8+
const client = instrumentGoogleGenAIClient(mockClient);
99

1010
// Test that manual instrumentation doesn't crash the browser
1111
// The instrumentation automatically creates spans
@@ -30,6 +30,3 @@ const response = await chat.sendMessage({
3030
});
3131

3232
console.log("Received response", response)
33-
34-
// Ensure transaction is flushed in CI
35-
await Sentry.flush(2000);

dev-packages/browser-integration-tests/suites/tracing/ai-providers/openai/subject.js

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
import * as Sentry from '@sentry/browser';
1+
import { instrumentOpenAiClient } from '@sentry/browser';
22
import { MockOpenAi } from './mocks.js';
33

44
const mockClient = new MockOpenAi({
55
apiKey: 'mock-api-key',
66
});
77

8-
const client = Sentry.instrumentOpenAiClient(mockClient);
8+
const client = instrumentOpenAiClient(mockClient);
99

1010
// Test that manual instrumentation doesn't crash the browser
1111
// The instrumentation automatically creates spans
@@ -20,6 +20,3 @@ const response = await client.chat.completions.create({
2020
});
2121

2222
console.log("Received response", response)
23-
24-
// Ensure transaction is flushed in CI
25-
await Sentry.flush(2000);

0 commit comments

Comments
 (0)