@@ -74,8 +74,10 @@ describe('withProfiler', () => {
7474 name : `<${ UNKNOWN_COMPONENT } >` ,
7575 onlyIfParent : true ,
7676 op : REACT_MOUNT_OP ,
77- origin : 'auto.ui.react.profiler' ,
78- attributes : { 'ui.component_name' : 'unknown' } ,
77+ attributes : {
78+ 'sentry.origin' : 'auto.ui.react.profiler' ,
79+ 'ui.component_name' : 'unknown' ,
80+ } ,
7981 } ) ;
8082 } ) ;
8183 } ) ;
@@ -93,9 +95,11 @@ describe('withProfiler', () => {
9395 name : `<${ UNKNOWN_COMPONENT } >` ,
9496 onlyIfParent : true ,
9597 op : REACT_RENDER_OP ,
96- origin : 'auto.ui.react.profiler' ,
97- startTimestamp : undefined ,
98- attributes : { 'ui.component_name' : 'unknown' } ,
98+ startTime : undefined ,
99+ attributes : {
100+ 'sentry.origin' : 'auto.ui.react.profiler' ,
101+ 'ui.component_name' : 'unknown' ,
102+ } ,
99103 } ) ;
100104 expect ( mockFinish ) . toHaveBeenCalledTimes ( 2 ) ;
101105 } ) ;
@@ -123,24 +127,30 @@ describe('withProfiler', () => {
123127 rerender ( < ProfiledComponent num = { 1 } /> ) ;
124128 expect ( mockStartInactiveSpan ) . toHaveBeenCalledTimes ( 2 ) ;
125129 expect ( mockStartInactiveSpan ) . toHaveBeenLastCalledWith ( {
126- attributes : { 'ui.react.changed_props' : [ 'num' ] , 'ui.component_name' : 'unknown' } ,
130+ attributes : {
131+ 'sentry.origin' : 'auto.ui.react.profiler' ,
132+ 'ui.react.changed_props' : [ 'num' ] ,
133+ 'ui.component_name' : 'unknown' ,
134+ } ,
127135 name : `<${ UNKNOWN_COMPONENT } >` ,
128136 onlyIfParent : true ,
129137 op : REACT_UPDATE_OP ,
130- origin : 'auto.ui.react.profiler' ,
131- startTimestamp : expect . any ( Number ) ,
138+ startTime : expect . any ( Number ) ,
132139 } ) ;
133140 expect ( mockFinish ) . toHaveBeenCalledTimes ( 2 ) ;
134141 // New props yet again
135142 rerender ( < ProfiledComponent num = { 2 } /> ) ;
136143 expect ( mockStartInactiveSpan ) . toHaveBeenCalledTimes ( 3 ) ;
137144 expect ( mockStartInactiveSpan ) . toHaveBeenLastCalledWith ( {
138- attributes : { 'ui.react.changed_props' : [ 'num' ] , 'ui.component_name' : 'unknown' } ,
145+ attributes : {
146+ 'sentry.origin' : 'auto.ui.react.profiler' ,
147+ 'ui.react.changed_props' : [ 'num' ] ,
148+ 'ui.component_name' : 'unknown' ,
149+ } ,
139150 name : `<${ UNKNOWN_COMPONENT } >` ,
140151 onlyIfParent : true ,
141152 op : REACT_UPDATE_OP ,
142- origin : 'auto.ui.react.profiler' ,
143- startTimestamp : expect . any ( Number ) ,
153+ startTime : expect . any ( Number ) ,
144154 } ) ;
145155 expect ( mockFinish ) . toHaveBeenCalledTimes ( 3 ) ;
146156
@@ -179,8 +189,10 @@ describe('useProfiler()', () => {
179189 name : '<Example>' ,
180190 onlyIfParent : true ,
181191 op : REACT_MOUNT_OP ,
182- origin : 'auto.ui.react.profiler' ,
183- attributes : { 'ui.component_name' : 'Example' } ,
192+ attributes : {
193+ 'ui.component_name' : 'Example' ,
194+ 'sentry.origin' : 'auto.ui.react.profiler' ,
195+ } ,
184196 } ) ;
185197 } ) ;
186198 } ) ;
@@ -204,8 +216,10 @@ describe('useProfiler()', () => {
204216 name : '<Example>' ,
205217 onlyIfParent : true ,
206218 op : REACT_RENDER_OP ,
207- origin : 'auto.ui.react.profiler' ,
208- attributes : { 'ui.component_name' : 'Example' } ,
219+ attributes : {
220+ 'sentry.origin' : 'auto.ui.react.profiler' ,
221+ 'ui.component_name' : 'Example' ,
222+ } ,
209223 } ) ,
210224 ) ;
211225 } ) ;
0 commit comments