@rpcbase/client 0.275.0 → 0.277.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/instrument.ts +5 -19
- package/package.json +1 -3
package/instrument.ts
CHANGED
|
@@ -1,27 +1,8 @@
|
|
|
1
|
-
import * as Sentry from "@sentry/react"
|
|
2
1
|
import posthog from "posthog-js"
|
|
3
2
|
|
|
4
3
|
|
|
5
4
|
const isProduction = import.meta.env.MODE === "production"
|
|
6
5
|
|
|
7
|
-
if (isProduction) {
|
|
8
|
-
if (!import.meta.env.RB_PUBLIC_SENTRY_DSN) {
|
|
9
|
-
console.warn("missing RB_PUBLIC_SENTRY_DSN")
|
|
10
|
-
}
|
|
11
|
-
if (!import.meta.env.RB_PUBLIC_SENTRY_RELEASE) {
|
|
12
|
-
console.warn("missing RB_PUBLIC_SENTRY_RELEASE, using 'unknown' as release version")
|
|
13
|
-
}
|
|
14
|
-
Sentry.init({
|
|
15
|
-
dsn: import.meta.env.RB_PUBLIC_SENTRY_DSN,
|
|
16
|
-
release: import.meta.env.RB_PUBLIC_SENTRY_RELEASE || "unknown",
|
|
17
|
-
sendDefaultPii: true,
|
|
18
|
-
tracesSampleRate: 1.0,
|
|
19
|
-
debug: localStorage.getItem("RB_DEBUG_SENTRY") === "yes",
|
|
20
|
-
})
|
|
21
|
-
} else {
|
|
22
|
-
console.info("ℹ️ Not initializing sentry in development")
|
|
23
|
-
}
|
|
24
|
-
|
|
25
6
|
|
|
26
7
|
if (isProduction) {
|
|
27
8
|
if (import.meta.env.RB_PUBLIC_POSTHOG_KEY) {
|
|
@@ -33,6 +14,11 @@ if (isProduction) {
|
|
|
33
14
|
maskAllInputs: false
|
|
34
15
|
},
|
|
35
16
|
capture_pageview: isProduction,
|
|
17
|
+
capture_exceptions: {
|
|
18
|
+
capture_unhandled_errors: true,
|
|
19
|
+
capture_unhandled_rejections: true,
|
|
20
|
+
capture_console_errors: true,
|
|
21
|
+
},
|
|
36
22
|
autocapture: isProduction,
|
|
37
23
|
disable_session_recording: !isProduction,
|
|
38
24
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rpcbase/client",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.277.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./src/index.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -27,8 +27,6 @@
|
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@sentry/react": "9.15.0",
|
|
31
|
-
"@sentry/tracing": "7.120.3",
|
|
32
30
|
"axios": "1.9.0",
|
|
33
31
|
"fast-equals": "5.2.2",
|
|
34
32
|
"lodash": "4.17.21",
|