From b6ad7dfe1e16122ca16b6304e1a7b1c362cf2156 Mon Sep 17 00:00:00 2001 From: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com> Date: Tue, 14 Jan 2025 10:03:56 -0800 Subject: [PATCH 1/2] fix: Clear pending events buffer when registered. (#727) After the client is registered there isn't any further use for the pending events. --- packages/telemetry/browser-telemetry/src/BrowserTelemetryImpl.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/telemetry/browser-telemetry/src/BrowserTelemetryImpl.ts b/packages/telemetry/browser-telemetry/src/BrowserTelemetryImpl.ts index 41ce9a351..9e030dbe9 100644 --- a/packages/telemetry/browser-telemetry/src/BrowserTelemetryImpl.ts +++ b/packages/telemetry/browser-telemetry/src/BrowserTelemetryImpl.ts @@ -130,6 +130,7 @@ export default class BrowserTelemetryImpl implements BrowserTelemetry { this._pendingEvents.forEach((event) => { this._client?.track(event.type, event.data); }); + this._pendingEvents = []; } inspectors(): LDInspection[] { From 20cccbf22f4c97bbbd4b4cebcef36b75a4b5853a Mon Sep 17 00:00:00 2001 From: Ryan Lamb <4955475+kinyoklion@users.noreply.github.com> Date: Tue, 14 Jan 2025 10:04:16 -0800 Subject: [PATCH 2/2] chore: Remove rrweb dependency. (#726) EMSR-1 --- packages/telemetry/browser-telemetry/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/telemetry/browser-telemetry/package.json b/packages/telemetry/browser-telemetry/package.json index 2b3536421..4b26088a1 100644 --- a/packages/telemetry/browser-telemetry/package.json +++ b/packages/telemetry/browser-telemetry/package.json @@ -44,7 +44,6 @@ "url": "https://github.com/launchdarkly/js-core/issues" }, "dependencies": { - "rrweb": "2.0.0-alpha.4", "tracekit": "^0.4.6" }, "devDependencies": {