diff --git a/web/hwlab-cloud-web/src/utils/rum.ts b/web/hwlab-cloud-web/src/utils/rum.ts index bbdbc3e6..8523e2ef 100644 --- a/web/hwlab-cloud-web/src/utils/rum.ts +++ b/web/hwlab-cloud-web/src/utils/rum.ts @@ -37,6 +37,7 @@ export function installWebRum(): void { export function recordApiTiming(input: ApiTimingInput): void { if (typeof window === "undefined") return; + if (isWorkbenchPageRoute()) return; const valueMs = Math.max(0, Date.now() - input.startedAt); enqueue({ kind: "api", @@ -118,6 +119,11 @@ function pageRoute(): string { return `${window.location.pathname}${window.location.hash || ""}` || "/"; } +function isWorkbenchPageRoute(): boolean { + const pathname = window.location.pathname || ""; + return pathname.startsWith("/workbench") || pathname.startsWith("/workspace"); +} + function statusClass(status?: number): string { if (!status || !Number.isFinite(status)) return "network"; return `${Math.floor(status / 100)}xx`;