diff --git a/app/util/sentry/utils.js b/app/util/sentry/utils.js index 06937e5d3bc..5241f5fa41e 100644 --- a/app/util/sentry/utils.js +++ b/app/util/sentry/utils.js @@ -10,6 +10,7 @@ import { store } from '../../store'; import { Performance } from '../../core/Performance'; import Device from '../device'; import { TraceName } from '../trace'; +import { getTraceTags } from './tags'; /** * This symbol matches all object properties when used in a mask */ @@ -402,15 +403,19 @@ function rewriteReport(report) { */ export function excludeEvents(event) { // This is needed because store starts to initialise before performance observers completes to measure app start time - if (event?.transaction === TraceName.UIStartup && Device.isAndroid()) { - const appLaunchTime = Performance.appLaunchTime; - const formattedAppLaunchTime = (event.start_timestamp = Number( - `${appLaunchTime.toString().slice(0, 10)}.${appLaunchTime - .toString() - .slice(10)}`, - )); - if (event.start_timestamp !== formattedAppLaunchTime) { - event.start_timestamp = formattedAppLaunchTime; + if (event?.transaction === TraceName.UIStartup) { + event.tags = getTraceTags(store.getState()); + + if (Device.isAndroid()) { + const appLaunchTime = Performance.appLaunchTime; + const formattedAppLaunchTime = (event.start_timestamp = Number( + `${appLaunchTime.toString().slice(0, 10)}.${appLaunchTime + .toString() + .slice(10)}`, + )); + if (event.start_timestamp !== formattedAppLaunchTime) { + event.start_timestamp = formattedAppLaunchTime; + } } } //Modify or drop event here