@@ -74,8 +74,10 @@ describe('withProfiler', () => {
74
74
name : `<${ UNKNOWN_COMPONENT } >` ,
75
75
onlyIfParent : true ,
76
76
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
+ } ,
79
81
} ) ;
80
82
} ) ;
81
83
} ) ;
@@ -93,9 +95,11 @@ describe('withProfiler', () => {
93
95
name : `<${ UNKNOWN_COMPONENT } >` ,
94
96
onlyIfParent : true ,
95
97
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
+ } ,
99
103
} ) ;
100
104
expect ( mockFinish ) . toHaveBeenCalledTimes ( 2 ) ;
101
105
} ) ;
@@ -123,24 +127,30 @@ describe('withProfiler', () => {
123
127
rerender ( < ProfiledComponent num = { 1 } /> ) ;
124
128
expect ( mockStartInactiveSpan ) . toHaveBeenCalledTimes ( 2 ) ;
125
129
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
+ } ,
127
135
name : `<${ UNKNOWN_COMPONENT } >` ,
128
136
onlyIfParent : true ,
129
137
op : REACT_UPDATE_OP ,
130
- origin : 'auto.ui.react.profiler' ,
131
- startTimestamp : expect . any ( Number ) ,
138
+ startTime : expect . any ( Number ) ,
132
139
} ) ;
133
140
expect ( mockFinish ) . toHaveBeenCalledTimes ( 2 ) ;
134
141
// New props yet again
135
142
rerender ( < ProfiledComponent num = { 2 } /> ) ;
136
143
expect ( mockStartInactiveSpan ) . toHaveBeenCalledTimes ( 3 ) ;
137
144
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
+ } ,
139
150
name : `<${ UNKNOWN_COMPONENT } >` ,
140
151
onlyIfParent : true ,
141
152
op : REACT_UPDATE_OP ,
142
- origin : 'auto.ui.react.profiler' ,
143
- startTimestamp : expect . any ( Number ) ,
153
+ startTime : expect . any ( Number ) ,
144
154
} ) ;
145
155
expect ( mockFinish ) . toHaveBeenCalledTimes ( 3 ) ;
146
156
@@ -179,8 +189,10 @@ describe('useProfiler()', () => {
179
189
name : '<Example>' ,
180
190
onlyIfParent : true ,
181
191
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
+ } ,
184
196
} ) ;
185
197
} ) ;
186
198
} ) ;
@@ -204,8 +216,10 @@ describe('useProfiler()', () => {
204
216
name : '<Example>' ,
205
217
onlyIfParent : true ,
206
218
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
+ } ,
209
223
} ) ,
210
224
) ;
211
225
} ) ;
0 commit comments