Chromium's crash reports reach the server, which logs each and files it in Sentry as a warning, and the page's own errors name the room and seat and leave extensions' failures out
A tab that crashes takes the page's error reporting down with it, so the page never says so. Every page now names a default Reporting API endpoint, /api/reports, where Chromium sends a crash report after the fact; the server logs the room, the reason when one is given, and the browser, and files a warning that rings no bell. Other report types are ignored, and an address may send ten an hour. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0141G6xqLeNRYEtviLWSB5Up
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
9a1c98ca55
commit
956c908867
@@ -10,7 +10,8 @@ if (import.meta.env.VITE_SENTRY_DSN) {
|
||||
environment: "production",
|
||||
// Facebook's in-app browser injects its own scripts (iabjs://) and
|
||||
// reports their failures as ours when the page unloads.
|
||||
denyUrls: [/^iabjs:\/\//],
|
||||
// Extensions run their own scripts in the page, and their failures are not ours.
|
||||
denyUrls: [/^iabjs:\/\//, /^(chrome|moz|safari(-web)?)-extension:\/\//],
|
||||
ignoreErrors: ["Java object is gone"],
|
||||
});
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ import type { ReplayStep } from "./catchup";
|
||||
import type { Command, GameEvent, GameView, Side } from "@wizwar/engine";
|
||||
import { cardDef, isPermanentDuration } from "@wizwar/engine";
|
||||
import { receiptFor } from "./receipt";
|
||||
import * as Sentry from "@sentry/browser";
|
||||
|
||||
/** The same server over plain HTTP, for the one door a socket cannot carry: a picture. */
|
||||
const API_URL =
|
||||
@@ -572,6 +573,8 @@ class Net {
|
||||
break;
|
||||
case "room":
|
||||
this.roomId = msg.roomId;
|
||||
// An error report names the table it happened at, and from which seat.
|
||||
Sentry.setTags({ room: msg.roomId, seat: this.spectating ? "gallery" : (this.you ?? "none") });
|
||||
this.roomColors = msg.colors ?? {};
|
||||
this.roomBots = msg.bots ?? {};
|
||||
this.standIns = msg.standIns ?? [];
|
||||
@@ -1001,6 +1004,7 @@ class Net {
|
||||
* line, and wiping it would erase the only notice of why. */
|
||||
leaveLocal(): void {
|
||||
localStorage.removeItem(SEAT_KEY);
|
||||
Sentry.setTags({ room: "none", seat: "none" });
|
||||
this.missedSteps = null;
|
||||
this.catchUp = null;
|
||||
this.pending = null;
|
||||
|
||||
Reference in New Issue
Block a user