Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

sentry: Don't run on unsupported browsers.

Shubham Padiab756feba8497
diff --git a/web/src/sentry.ts b/web/src/sentry.ts
index 6b4281c14f4..1061537a12f 100644
--- a/web/src/sentry.ts
+++ b/web/src/sentry.ts
@@ -1,6 +1,8 @@
import * as Sentry from "@sentry/browser";
import * as z from "zod/mini";
+import {is_browser_unsupported_old_version} from "./browser_support.ts";
+
type UserInfo = {
id?: string;
realm: string;
@@ -45,7 +47,7 @@ export function shouldCreateSpanForRequest(url: string): boolean {
return parsed.pathname !== "/json/events";
}
-if (sentry_params !== undefined) {
+if (sentry_params !== undefined && !is_browser_unsupported_old_version()) {
const sample_rates = new Map([
// This is controlled by shouldCreateSpanForRequest, above, but also put here for consistency
["call GET /json/events", 0],