We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 026dfe9 commit 0e2bf38Copy full SHA for 0e2bf38
packages/react/src/index.ts
@@ -1,4 +1,27 @@
1
+import { addGlobalEventProcessor, SDK_VERSION } from '@sentry/browser';
2
+
3
+function createReactEventProcessor(): void {
4
+ addGlobalEventProcessor(event => {
5
+ event.sdk = {
6
+ ...event.sdk,
7
+ name: 'sentry.javascript.react',
8
+ packages: [
9
+ ...((event.sdk && event.sdk.packages) || []),
10
+ {
11
+ name: 'npm:@sentry/react',
12
+ version: SDK_VERSION,
13
+ },
14
+ ],
15
16
+ };
17
18
+ return event;
19
+ });
20
+}
21
22
export * from '@sentry/browser';
23
24
export { Profiler, withProfiler, useProfiler } from './profiler';
25
export { ErrorBoundary, withErrorBoundary } from './errorboundary';
26
27
+createReactEventProcessor();
0 commit comments