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: Ignore HeadlessChrome "browsers."

Alex Vandiver67d30fe43f57
diff --git a/web/src/sentry.ts b/web/src/sentry.ts
index ef15d770637..4d1bea2a0aa 100644
--- a/web/src/sentry.ts
+++ b/web/src/sentry.ts
@@ -47,7 +47,11 @@ export function shouldCreateSpanForRequest(url: string): boolean {
return parsed.pathname !== "/json/events";
}
-if (sentry_params !== undefined && !is_browser_unsupported_old_version()) {
+if (
+ sentry_params !== undefined &&
+ !is_browser_unsupported_old_version() &&
+ !window.navigator.userAgent.includes("HeadlessChrome")
+) {
const sample_rates = new Map([
// This is controlled by shouldCreateSpanForRequest, above, but also put here for consistency
["call GET /json/events", 0],