From 5ee27fce3e7a1a8eb861336575349de8cb17d49b Mon Sep 17 00:00:00 2001 From: MoumitaM Date: Thu, 18 Jul 2024 13:41:51 +0530 Subject: [PATCH] chore: update metrics service url --- .../__tests__/errorReporting/index.test.ts | 4 ++++ packages/analytics-js-plugins/src/errorReporting/index.ts | 3 +-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/analytics-js-plugins/__tests__/errorReporting/index.test.ts b/packages/analytics-js-plugins/__tests__/errorReporting/index.test.ts index 76f5502a2..639e3b5c0 100644 --- a/packages/analytics-js-plugins/__tests__/errorReporting/index.test.ts +++ b/packages/analytics-js-plugins/__tests__/errorReporting/index.test.ts @@ -56,6 +56,10 @@ describe('Plugin - ErrorReporting', () => { }); it('should invoke the error reporting provider plugin on notify', () => { + state.lifecycle = { + activeDataplaneUrl: signal('https://test.com'), + writeKey: signal('sample-write-key'), + }; const mockHttpClient = { getAsyncData: jest.fn(), setAuthHeader: jest.fn(), diff --git a/packages/analytics-js-plugins/src/errorReporting/index.ts b/packages/analytics-js-plugins/src/errorReporting/index.ts index 08cfac033..bfe30ae62 100644 --- a/packages/analytics-js-plugins/src/errorReporting/index.ts +++ b/packages/analytics-js-plugins/src/errorReporting/index.ts @@ -93,8 +93,7 @@ const ErrorReporting = (): ExtensionPlugin => ({ // send it to metrics service httpClient?.getAsyncData({ - url: `https://sdk-metrics.rudderstack.com/sdkmetrics`, - // url: `${state.lifecycle.dataPlaneUrl.value}/sdk-metrics`, + url: `${state.lifecycle.activeDataplaneUrl.value}/rsaMetrics`, options: { method: 'POST', data: getErrorDeliveryPayload(bugsnagPayload, state),