Skip to content

Commit 6bca21d

Browse files
committed
fix test?
1 parent 2a51114 commit 6bca21d

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,21 @@ test('RPC method which throws an exception to be logged to sentry', async ({ bas
2727
const event = await eventWaiter;
2828
expect(event.exception?.values?.[0]?.value).toBe('Should be recorded in Sentry.');
2929
});
30+
3031
test("Request processed by DurableObject's fetch is recorded", async ({ baseURL }) => {
32+
console.log('xx Request processed by DurableObject');
3133
const eventWaiter = waitForError('cloudflare-workers', event => {
32-
return event.exception?.values?.[0]?.mechanism?.type === 'auto.faas.cloudflare.durable_object';
34+
return event.exception?.values?.[0]?.mechanism?.type === 'cloudflare_durableobject';
3335
});
3436
const response = await fetch(`${baseURL}/pass-to-object/throwException`);
3537
expect(response.status).toBe(500);
3638
const event = await eventWaiter;
3739
expect(event.exception?.values?.[0]?.value).toBe('Should be recorded in Sentry.');
3840
});
41+
3942
test('Websocket.webSocketMessage', async ({ baseURL }) => {
4043
const eventWaiter = waitForError('cloudflare-workers', event => {
41-
return event.exception?.values?.[0]?.mechanism?.type === 'auto.faas.cloudflare.durable_object';
44+
return event.exception?.values?.[0]?.mechanism?.type === 'cloudflare_durableobject';
4245
});
4346
const url = new URL('/pass-to-object/ws', baseURL);
4447
url.protocol = url.protocol.replace('http', 'ws');

packages/cloudflare/src/durableobject.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ export function instrumentDurableObjectWithSentry<
243243
(_, error) =>
244244
captureException(error, {
245245
mechanism: {
246-
type: 'cloudflare_durableobject_websocket',
246+
type: 'auto.faas.cloudflare.durable_object_websocket',
247247
handled: false,
248248
},
249249
}),

0 commit comments

Comments
 (0)