@@ -76,8 +76,10 @@ describe('withProfiler', () => {
7676 name : `<${ UNKNOWN_COMPONENT } >` ,
7777 onlyIfParent : true ,
7878 op : REACT_MOUNT_OP ,
79- origin : 'auto.ui.react.profiler' ,
80- attributes : { 'ui.component_name' : 'unknown' } ,
79+ attributes : {
80+ 'sentry.origin' : 'auto.ui.react.profiler' ,
81+ 'ui.component_name' : 'unknown' ,
82+ } ,
8183 } ) ;
8284 } ) ;
8385 } ) ;
@@ -95,9 +97,11 @@ describe('withProfiler', () => {
9597 name : `<${ UNKNOWN_COMPONENT } >` ,
9698 onlyIfParent : true ,
9799 op : REACT_RENDER_OP ,
98- origin : 'auto.ui.react.profiler' ,
99- startTimestamp : undefined ,
100- attributes : { 'ui.component_name' : 'unknown' } ,
100+ startTime : undefined ,
101+ attributes : {
102+ 'sentry.origin' : 'auto.ui.react.profiler' ,
103+ 'ui.component_name' : 'unknown' ,
104+ } ,
101105 } ) ;
102106 expect ( mockFinish ) . toHaveBeenCalledTimes ( 2 ) ;
103107 } ) ;
@@ -125,24 +129,30 @@ describe('withProfiler', () => {
125129 rerender ( < ProfiledComponent num = { 1 } /> ) ;
126130 expect ( mockStartInactiveSpan ) . toHaveBeenCalledTimes ( 2 ) ;
127131 expect ( mockStartInactiveSpan ) . toHaveBeenLastCalledWith ( {
128- attributes : { 'ui.react.changed_props' : [ 'num' ] , 'ui.component_name' : 'unknown' } ,
132+ attributes : {
133+ 'sentry.origin' : 'auto.ui.react.profiler' ,
134+ 'ui.react.changed_props' : [ 'num' ] ,
135+ 'ui.component_name' : 'unknown' ,
136+ } ,
129137 name : `<${ UNKNOWN_COMPONENT } >` ,
130138 onlyIfParent : true ,
131139 op : REACT_UPDATE_OP ,
132- origin : 'auto.ui.react.profiler' ,
133- startTimestamp : expect . any ( Number ) ,
140+ startTime : expect . any ( Number ) ,
134141 } ) ;
135142 expect ( mockFinish ) . toHaveBeenCalledTimes ( 2 ) ;
136143 // New props yet again
137144 rerender ( < ProfiledComponent num = { 2 } /> ) ;
138145 expect ( mockStartInactiveSpan ) . toHaveBeenCalledTimes ( 3 ) ;
139146 expect ( mockStartInactiveSpan ) . toHaveBeenLastCalledWith ( {
140- attributes : { 'ui.react.changed_props' : [ 'num' ] , 'ui.component_name' : 'unknown' } ,
147+ attributes : {
148+ 'sentry.origin' : 'auto.ui.react.profiler' ,
149+ 'ui.react.changed_props' : [ 'num' ] ,
150+ 'ui.component_name' : 'unknown' ,
151+ } ,
141152 name : `<${ UNKNOWN_COMPONENT } >` ,
142153 onlyIfParent : true ,
143154 op : REACT_UPDATE_OP ,
144- origin : 'auto.ui.react.profiler' ,
145- startTimestamp : expect . any ( Number ) ,
155+ startTime : expect . any ( Number ) ,
146156 } ) ;
147157 expect ( mockFinish ) . toHaveBeenCalledTimes ( 3 ) ;
148158
@@ -181,8 +191,10 @@ describe('useProfiler()', () => {
181191 name : '<Example>' ,
182192 onlyIfParent : true ,
183193 op : REACT_MOUNT_OP ,
184- origin : 'auto.ui.react.profiler' ,
185- attributes : { 'ui.component_name' : 'Example' } ,
194+ attributes : {
195+ 'ui.component_name' : 'Example' ,
196+ 'sentry.origin' : 'auto.ui.react.profiler' ,
197+ } ,
186198 } ) ;
187199 } ) ;
188200 } ) ;
@@ -206,8 +218,10 @@ describe('useProfiler()', () => {
206218 name : '<Example>' ,
207219 onlyIfParent : true ,
208220 op : REACT_RENDER_OP ,
209- origin : 'auto.ui.react.profiler' ,
210- attributes : { 'ui.component_name' : 'Example' } ,
221+ attributes : {
222+ 'sentry.origin' : 'auto.ui.react.profiler' ,
223+ 'ui.component_name' : 'Example' ,
224+ } ,
211225 } ) ,
212226 ) ;
213227 } ) ;
0 commit comments