@@ -24,6 +24,7 @@ class RNPerfMetrics {
2424 readonly #consoleErrorMethod = 'error' ;
2525 #listeners: Set < RNReliabilityEventListener > = new Set ( ) ;
2626 #launchId: string | null = null ;
27+ #telemetryInfo: Object = { } ;
2728 // map of panel location to panel name
2829 #currentPanels: Map < PanelLocation , string > = new Map ( ) ;
2930
@@ -119,6 +120,10 @@ class RNPerfMetrics {
119120 this . #launchId = launchId ;
120121 }
121122
123+ setTelemetryInfo ( telemetryInfo : Object ) : void {
124+ this . #telemetryInfo = telemetryInfo ;
125+ }
126+
122127 entryPointLoadingStarted ( entryPoint : EntryPoint ) : void {
123128 this . sendEvent ( {
124129 eventName : 'Entrypoint.LoadingStarted' ,
@@ -263,6 +268,7 @@ class RNPerfMetrics {
263268 const commonFields : CommonEventFields = {
264269 timestamp : getPerfTimestamp ( ) ,
265270 launchId : this . #launchId,
271+ telemetryInfo : this . #telemetryInfo,
266272 currentPanels : this . #currentPanels,
267273 } ;
268274
@@ -295,6 +301,7 @@ function maybeWrapError(baseMessage: string, error: unknown): [string, Error] {
295301type CommonEventFields = Readonly < {
296302 timestamp : DOMHighResTimeStamp ,
297303 launchId : string | void | null ,
304+ telemetryInfo : Object ,
298305 currentPanels : Map < PanelLocation , string > ,
299306} > ;
300307
0 commit comments