Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1335cc9

Browse files
authored
ref(browser): Set more descriptive mechanism.type in browserApiErrorsIntergation (#17251)
`type` now follows the[ trace origin](https://develop.sentry.dev/sdk/telemetry/traces/trace-origin/) naming scheme. Omitted `data.function` in favour of more specific types. see #17212 closes #17250
1 parent 41e0372 commit 1335cc9

File tree

15 files changed

+21
-34
lines changed

15 files changed

+21
-34
lines changed

‎dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener/event-target/test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@ sentryTest('should capture target name in mechanism data', async ({ getLocalTest
1313
type: 'Error',
1414
value: 'event_listener_error',
1515
mechanism: {
16-
type: 'instrument',
16+
type: 'auto.browser.browserapierrors.addEventListener',
1717
handled: false,
1818
data: {
19-
function: 'addEventListener',
2019
handler: 'functionListener',
2120
target: 'EventTarget',
2221
},

‎dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener/named-function/test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@ sentryTest('should capture built-in handlers fn name in mechanism data', async (
1313
type: 'Error',
1414
value: 'event_listener_error',
1515
mechanism: {
16-
type: 'instrument',
16+
type: 'auto.browser.browserapierrors.addEventListener',
1717
handled: false,
1818
data: {
19-
function: 'addEventListener',
2019
handler: 'clickHandler',
2120
target: 'EventTarget',
2221
},

‎dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener/remove/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ sentryTest('should transparently remove event listeners from wrapped functions',
1313
type: 'Error',
1414
value: 'foo',
1515
mechanism: {
16-
type: 'instrument',
16+
type: 'auto.browser.browserapierrors.addEventListener',
1717
handled: false,
1818
},
1919
stacktrace: {

‎dev-packages/browser-integration-tests/suites/public-api/instrumentation/eventListener/thrown-error/test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@ sentryTest(
1515
type: 'Error',
1616
value: 'event_listener_error',
1717
mechanism: {
18-
type: 'instrument',
18+
type: 'auto.browser.browserapierrors.addEventListener',
1919
handled: false,
2020
data: {
21-
function: 'addEventListener',
2221
handler: '<anonymous>',
2322
target: 'EventTarget',
2423
},

‎dev-packages/browser-integration-tests/suites/public-api/instrumentation/requestAnimationFrame/thrown-errors/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ sentryTest('should capture exceptions inside callback', async ({ getLocalTestUrl
1313
type: 'Error',
1414
value: 'requestAnimationFrame_error',
1515
mechanism: {
16-
type: 'instrument',
16+
type: 'auto.browser.browserapierrors.requestAnimationFrame',
1717
handled: false,
1818
},
1919
stacktrace: {

‎dev-packages/browser-integration-tests/suites/public-api/instrumentation/setInterval/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ sentryTest('Instrumentation should capture errors in setInterval', async ({ getL
1313
type: 'Error',
1414
value: 'setInterval_error',
1515
mechanism: {
16-
type: 'instrument',
16+
type: 'auto.browser.browserapierrors.setInterval',
1717
handled: false,
1818
},
1919
stacktrace: {

‎dev-packages/browser-integration-tests/suites/public-api/instrumentation/setTimeout/test.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,8 @@ sentryTest('Instrumentation should capture errors in setTimeout', async ({ getLo
1313
type: 'Error',
1414
value: 'setTimeout_error',
1515
mechanism: {
16-
type: 'instrument',
16+
type: 'auto.browser.browserapierrors.setTimeout',
1717
handled: false,
18-
data: {
19-
function: 'setTimeout',
20-
},
2118
},
2219
stacktrace: {
2320
frames: expect.any(Array),

‎dev-packages/browser-integration-tests/suites/public-api/instrumentation/setTimeoutFrozen/test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ sentryTest(
2525
type: 'Error',
2626
value: 'setTimeout_error',
2727
mechanism: {
28-
type: 'instrument',
28+
type: 'auto.browser.browserapierrors.setTimeout',
2929
handled: false,
3030
},
3131
stacktrace: {

‎dev-packages/browser-integration-tests/suites/public-api/instrumentation/xhr/thrown-error/test.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,8 @@ sentryTest(
1515
type: 'Error',
1616
value: 'xhr_error',
1717
mechanism: {
18-
type: 'instrument',
18+
type: 'auto.browser.browserapierrors.xhr.onreadystatechange',
1919
handled: false,
20-
data: {
21-
function: 'onreadystatechange',
22-
},
2320
},
2421
stacktrace: {
2522
frames: expect.any(Array),

‎dev-packages/e2e-tests/test-applications/ember-classic/tests/errors.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ test('sends an error', async ({ page }) => {
1919
type: 'TypeError',
2020
value: 'this.nonExistentFunction is not a function',
2121
mechanism: {
22-
type: 'instrument',
22+
type: 'auto.browser.browserapierrors.addEventListener',
2323
handled: false,
2424
},
2525
},
@@ -55,7 +55,7 @@ test('assigns the correct transaction value after a navigation', async ({ page }
5555
type: 'TypeError',
5656
value: 'this.nonExistentFunction is not a function',
5757
mechanism: {
58-
type: 'instrument',
58+
type: 'auto.browser.browserapierrors.addEventListener',
5959
handled: false,
6060
},
6161
},

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /