-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(utils): Fix envelope parsing edge cases #13191
Changes from all commits
4b778e5
b8a1f4e
3fe2a15
fca8392
973ce64
52a23e3
59580f7
cc3656b
2ac8e26
d582b42
6f72704
96935b3
04ff0f6
ffbeccb
f91bf8f
6702590
49287cc
8b14626
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -119,7 +119,7 @@ sentryTest('error after navigation has navigation traceId', async ({ getLocalTes | |
await page.locator('#errorBtn').click(); | ||
const [errorEvent, errorTraceHeader] = await errorEventPromise; | ||
|
||
expect(errorEvent.type).toEqual(undefined); | ||
expect(errorEvent.type).toEqual('event'); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. h: let's not change this please unless there's a good reason to (is there?). So far, sending error events without a type worked well. |
||
|
||
const errorTraceContext = errorEvent.contexts?.trace; | ||
expect(errorTraceContext).toEqual({ | ||
|
@@ -157,10 +157,10 @@ sentryTest('error during navigation has new navigation traceId', async ({ getLoc | |
const envelopes = await envelopeRequestsPromise; | ||
|
||
const [navigationEvent, navigationTraceHeader] = envelopes.find(envelope => envelope[0].type === 'transaction')!; | ||
const [errorEvent, errorTraceHeader] = envelopes.find(envelope => !envelope[0].type)!; | ||
const [errorEvent, errorTraceHeader] = envelopes.find(envelope => envelope[0].type !== 'transaction')!; | ||
|
||
expect(navigationEvent.type).toEqual('transaction'); | ||
expect(errorEvent.type).toEqual(undefined); | ||
expect(errorEvent.type).toEqual('event'); | ||
|
||
const navigationTraceContext = navigationEvent?.contexts?.trace; | ||
expect(navigationTraceContext).toMatchObject({ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ import { waitForError, waitForTransaction } from '@sentry-internal/test-utils'; | |
|
||
test('sends an error', async ({ page }) => { | ||
const errorPromise = waitForError('ember-classic', async errorEvent => { | ||
return !errorEvent.type; | ||
return errorEvent.type !== 'transaction'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. m: I don't think this change is correct because event.type could be a lot more than |
||
}); | ||
|
||
await page.goto(`/`); | ||
|
@@ -35,7 +35,7 @@ test('assigns the correct transaction value after a navigation', async ({ page } | |
}); | ||
|
||
const errorPromise = waitForError('ember-classic', async errorEvent => { | ||
return !errorEvent.type; | ||
return errorEvent.type !== 'transaction'; | ||
}); | ||
|
||
await page.goto(`/tracing`); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
h: We should not add this field to standalone span envelopes.