Skip to content

Commit 79932b3

Browse files
committed
ref(browser): Set more descriptive mechanism.type in browserApiErrorsIntergation
1 parent be4550a commit 79932b3

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

packages/browser/src/helpers.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ export function wrap<T extends WrappableFunction, NonFunction>(
133133
return event;
134134
});
135135

136+
// no need to add a mechanism here, we already add it via an event processor above
136137
captureException(ex);
137138
});
138139

packages/browser/src/integrations/browserapierrors.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ function _wrapTimeFunction(original: () => void): () => number {
110110
mechanism: {
111111
data: { function: getFunctionName(original) },
112112
handled: false,
113-
type: 'instrument',
113+
type: 'browserApiErrors',
114114
},
115115
});
116116
return original.apply(this, args);
@@ -127,7 +127,7 @@ function _wrapRAF(original: () => void): (callback: () => void) => unknown {
127127
handler: getFunctionName(original),
128128
},
129129
handled: false,
130-
type: 'instrument',
130+
type: 'browserApiErrors',
131131
},
132132
}),
133133
]);
@@ -150,7 +150,7 @@ function _wrapXHR(originalSend: () => void): () => void {
150150
handler: getFunctionName(original),
151151
},
152152
handled: false,
153-
type: 'instrument',
153+
type: 'browserApiErrors',
154154
},
155155
};
156156

@@ -199,7 +199,7 @@ function _wrapEventTarget(target: string, integrationOptions: BrowserApiErrorsOp
199199
target,
200200
},
201201
handled: false,
202-
type: 'instrument',
202+
type: 'browserApiErrors',
203203
},
204204
});
205205
}
@@ -221,7 +221,7 @@ function _wrapEventTarget(target: string, integrationOptions: BrowserApiErrorsOp
221221
target,
222222
},
223223
handled: false,
224-
type: 'instrument',
224+
type: 'browserApiErrors',
225225
},
226226
}),
227227
options,

0 commit comments

Comments
 (0)