Skip to content

Commit

Permalink
Log more information to Sentry (#10339)
Browse files Browse the repository at this point in the history
* Increase the depth to which Error properties are sent to Sentry

* Log params for failed requests
  • Loading branch information
hbenl authored Feb 19, 2024
1 parent 6f81657 commit f439a95
Show file tree
Hide file tree
Showing 4 changed files with 69 additions and 2 deletions.
1 change: 1 addition & 0 deletions package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/protocol/socket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export async function sendMessage<M extends CommandMethods>(
return {};
}

console.warn("Message failed", method, { code, id, message }, data);
console.warn("Message failed", method, { code, id, message, params }, data);

let finalMessage = message;
if (process.env.NODE_ENV === "development") {
Expand Down
4 changes: 3 additions & 1 deletion src/ui/utils/telemetry.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { extraErrorDataIntegration } from "@sentry/integrations";
import * as Sentry from "@sentry/react";
import { Integrations } from "@sentry/tracing";

Expand Down Expand Up @@ -53,7 +54,8 @@ export function setupTelemetry() {

Sentry.init({
dsn: "https://41c20dff316f42fea692ef4f0d055261@o437061.ingest.sentry.io/5399075",
integrations: [new Integrations.BrowserTracing()],
integrations: [new Integrations.BrowserTracing(), extraErrorDataIntegration({ depth: 6 })],
normalizeDepth: 7,
tracesSampleRate: 1.0,
release: process.env.REPLAY_RELEASE ? process.env.REPLAY_RELEASE : "development",
beforeSend(event) {
Expand Down
64 changes: 64 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3725,6 +3725,16 @@ __metadata:
languageName: node
linkType: hard

"@sentry/core@npm:7.101.1":
version: 7.101.1
resolution: "@sentry/core@npm:7.101.1"
dependencies:
"@sentry/types": 7.101.1
"@sentry/utils": 7.101.1
checksum: 6cfb6e4b3d00dca3af6b91eca4d71bcfcac6e8b2e28a1ebfe6913348be7dae053e5c7d7d80e78ac12909ec63d6bb2056bbfdec91ca079bd5fb680a218b948de8
languageName: node
linkType: hard

"@sentry/core@npm:7.9.0":
version: 7.9.0
resolution: "@sentry/core@npm:7.9.0"
Expand All @@ -3748,6 +3758,18 @@ __metadata:
languageName: node
linkType: hard

"@sentry/integrations@npm:^7.101.1":
version: 7.101.1
resolution: "@sentry/integrations@npm:7.101.1"
dependencies:
"@sentry/core": 7.101.1
"@sentry/types": 7.101.1
"@sentry/utils": 7.101.1
localforage: ^1.8.1
checksum: 6c13f5bc894ba1665fdd26301da6bf2c63f0b7faaf685cd3a4eeea9219aaf56df197916745cea890494db69bde85942c89265d210516ad43ce1ce0bd647b18b8
languageName: node
linkType: hard

"@sentry/react@npm:^7.9.0":
version: 7.9.0
resolution: "@sentry/react@npm:7.9.0"
Expand Down Expand Up @@ -3775,13 +3797,29 @@ __metadata:
languageName: node
linkType: hard

"@sentry/types@npm:7.101.1":
version: 7.101.1
resolution: "@sentry/types@npm:7.101.1"
checksum: d1166c55b44eb869c61fb8d5f61ca79a7ef3f4346251c0d65d2ce79945894f7f85b05300cb51563389ab2c5954cfd5f7703aa92343c81e9bc7bcaae8cc8b45d6
languageName: node
linkType: hard

"@sentry/types@npm:7.9.0":
version: 7.9.0
resolution: "@sentry/types@npm:7.9.0"
checksum: 5f56d27454cab0344554bd85e9db8c34827dffa61145150664dc1ff478aaf599bffceb3a6bb20f592f0d8080b1f26b7af03c306a09c6463b8de4bdfdd10eecba
languageName: node
linkType: hard

"@sentry/utils@npm:7.101.1":
version: 7.101.1
resolution: "@sentry/utils@npm:7.101.1"
dependencies:
"@sentry/types": 7.101.1
checksum: 754b40f83c25d658a3cf4d2864b0a023c7550971ba7d1494af60493f772f7bf2c6a0e22567be41a6e4b4b45a114e54a1b402abb839428c74fd3b9391c9686498
languageName: node
linkType: hard

"@sentry/utils@npm:7.9.0":
version: 7.9.0
resolution: "@sentry/utils@npm:7.9.0"
Expand Down Expand Up @@ -10376,6 +10414,13 @@ __metadata:
languageName: node
linkType: hard

"immediate@npm:~3.0.5":
version: 3.0.6
resolution: "immediate@npm:3.0.6"
checksum: f9b3486477555997657f70318cc8d3416159f208bec4cca3ff3442fd266bc23f50f0c9bd8547e1371a6b5e82b821ec9a7044a4f7b944798b25aa3cc6d5e63e62
languageName: node
linkType: hard

"immer@npm:^9.0.7":
version: 9.0.15
resolution: "immer@npm:9.0.15"
Expand Down Expand Up @@ -12074,6 +12119,15 @@ __metadata:
languageName: node
linkType: hard

"lie@npm:3.1.1":
version: 3.1.1
resolution: "lie@npm:3.1.1"
dependencies:
immediate: ~3.0.5
checksum: 6da9f2121d2dbd15f1eca44c0c7e211e66a99c7b326ec8312645f3648935bc3a658cf0e9fa7b5f10144d9e2641500b4f55bd32754607c3de945b5f443e50ddd1
languageName: node
linkType: hard

"lilconfig@npm:^2.0.5, lilconfig@npm:^2.0.6":
version: 2.0.6
resolution: "lilconfig@npm:2.0.6"
Expand Down Expand Up @@ -12194,6 +12248,15 @@ __metadata:
languageName: node
linkType: hard

"localforage@npm:^1.8.1":
version: 1.10.0
resolution: "localforage@npm:1.10.0"
dependencies:
lie: 3.1.1
checksum: f2978b434dafff9bcb0d9498de57d97eba165402419939c944412e179cab1854782830b5ec196212560b22712d1dd03918939f59cf1d4fc1d756fca7950086cf
languageName: node
linkType: hard

"locate-path@npm:^2.0.0":
version: 2.0.0
resolution: "locate-path@npm:2.0.0"
Expand Down Expand Up @@ -14888,6 +14951,7 @@ __metadata:
"@replayio/protocol": ^0.68.0
"@replayio/react-devtools-inline": 4.28.6
"@replayio/replay": ^0.21.1
"@sentry/integrations": ^7.101.1
"@sentry/react": ^7.9.0
"@sentry/tracing": ^7.9.0
"@stripe/react-stripe-js": ^1.7.0
Expand Down

0 comments on commit f439a95

Please sign in to comment.