From 9fc75cd1f47120d8f45a0c640c23f858b58ca44e Mon Sep 17 00:00:00 2001 From: yashmantri Date: Thu, 14 Nov 2024 15:34:39 +0530 Subject: [PATCH] NTP-11577 | Metadata added --- src/components/utlis/sentry.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/utlis/sentry.ts b/src/components/utlis/sentry.ts index 73c815ef..37f683b7 100644 --- a/src/components/utlis/sentry.ts +++ b/src/components/utlis/sentry.ts @@ -4,6 +4,7 @@ import { addClickstreamEvent } from '../../services/clickstreamEventService'; import { CLICKSTREAM_EVENT_NAMES } from '../../common/Constants'; import { getAppVersion } from './commonFunctions'; import { createTransport } from '@sentry/core'; +import { GLOBAL } from '@constants/Global'; function makeFetchTransport(options: any): any { function makeRequest(request: any) { @@ -40,7 +41,12 @@ export async function initSentry() { ...event.extra, release_id: getAppVersion(), alfredSessionId: '', - metadata: {}, + metadata: { + agentId: GLOBAL?.AGENT_ID, + deviceId: GLOBAL?.DEVICE_ID, + isImpersonated: GLOBAL?.IS_IMPERSONATED, + buildFlavour: GLOBAL.BUILD_FLAVOUR, + }, }; return event; },