diff --git a/app/client/src/utils/PerformanceTracker.ts b/app/client/src/utils/PerformanceTracker.ts index 68addb9343..934a4bfed1 100644 --- a/app/client/src/utils/PerformanceTracker.ts +++ b/app/client/src/utils/PerformanceTracker.ts @@ -33,8 +33,13 @@ export enum PerformanceTransactionName { LOGIN_CLICK = "LOGIN_CLICK", INIT_EDIT_APP = "INIT_EDIT_APP", INIT_VIEW_APP = "INIT_VIEW_APP", + SHOW_RESIZE_HANDLES = "SHOW_RESIZE_HANDLES", } +export type PerfTag = { + name: "string"; + value: "string"; +}; export interface PerfLog { sentrySpan: Span; skipLog?: boolean; @@ -51,6 +56,7 @@ class PerformanceTracker { eventName: PerformanceTransactionName, data?: any, skipLog = false, + tags: null | Array = null, ) => { if (appsmithConfigs.sentry.enabled) { const currentTransaction = Sentry.getCurrentHub() @@ -78,6 +84,11 @@ class PerformanceTracker { ); } const newTransaction = Sentry.startTransaction({ name: eventName }); + if (tags && Array.isArray(tags)) { + tags.forEach(({ name: tagName, value }) => { + newTransaction.setTag(tagName, value); + }); + } newTransaction.setData("startData", data); Sentry.getCurrentHub().configureScope((scope) => scope.setSpan(newTransaction),