diff --git a/packages/web-performance/src/index.ts b/packages/web-performance/src/index.ts index 99b4d1a9..8ee0d2b7 100644 --- a/packages/web-performance/src/index.ts +++ b/packages/web-performance/src/index.ts @@ -50,6 +50,7 @@ class WebVitals implements IWebVitals { this.immediately = immediately const sessionId = generateUniqueID() + window.__monitor_sessionId__ = sessionId reporter = createReporter(sessionId, appId, version, reportCallback) metricsStore = new MetricsStore() diff --git a/packages/web-performance/src/types/index.ts b/packages/web-performance/src/types/index.ts index fc07b4dd..88a18b6f 100644 --- a/packages/web-performance/src/types/index.ts +++ b/packages/web-performance/src/types/index.ts @@ -131,5 +131,6 @@ declare global { // Build flags: __monitor_xhr__: boolean __monitor_fetch__: boolean + __monitor_sessionId__: string } }