Skip to content

Commit 013bb08

Browse files
committed
fixup! feat(cloudflare): Add instrumentAgentWithSentry for Cloudflare Agents
1 parent 8d30830 commit 013bb08

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

dev-packages/e2e-tests/test-applications/cloudflare-agent/worker/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ import { MockAi } from './mocks';
99
const MODEL = '@cf/meta/llama-3.1-8b-instruct';
1010

1111
const sentryOptions = (env: Env) => ({
12-
traceLifecycle: 'static',
12+
traceLifecycle: 'static' as const,
1313
dsn: env.E2E_TEST_DSN,
1414
tunnel: `http://localhost:3031/`,
1515
tracesSampleRate: 1,
1616
enableRpcTracePropagation: true,
17+
durableObjectStorageSpanAllowlist: ['cf_user_key'],
1718
// Keep gen_ai spans embedded in the transaction (instead of streamed as a separate envelope
1819
// container) so they can be asserted on `transaction.spans`.
1920
streamGenAiSpans: false,

packages/cloudflare/test/instrumentCloudflareAgent.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ describe('instrumentCloudflareAgent', () => {
3535
const options: CloudflareClientOptions = {
3636
dsn,
3737
tracesSampleRate: 1,
38+
traceLifecycle: 'static',
3839
stackParser: () => [],
3940
integrations: [],
4041
transport: () => ({

0 commit comments

Comments
 (0)