@@ -178,11 +178,11 @@ describe('_INTERNAL_captureLog', () => {
178178 scope . setClient ( client ) ;
179179
180180 scope . setAttribute ( 'scope_1' , 'attribute_value' ) ;
181- scope . setAttribute ( 'scope_2' , { value : 143.5 , type : 'double' , unit : 'bytes ' } ) ;
181+ scope . setAttribute ( 'scope_2' , { value : 38 , unit : 'gigabytes ' } ) ;
182182 scope . setAttributes ( {
183183 scope_3 : true ,
184184 scope_4 : [ 1 , 2 , 3 ] ,
185- scope_5 : { value : [ true , false , true ] , type : 'boolean[]' , unit : 's' } ,
185+ scope_5 : { value : [ true , false , true ] , unit : 's' } ,
186186 } ) ;
187187
188188 _INTERNAL_captureLog (
@@ -210,9 +210,9 @@ describe('_INTERNAL_captureLog', () => {
210210 value : 'attribute_value' ,
211211 } ,
212212 scope_2 : {
213- type : 'double ' ,
214- unit : 'bytes ' ,
215- value : 143.5 ,
213+ type : 'integer ' ,
214+ unit : 'gigabytes ' ,
215+ value : 38 ,
216216 } ,
217217 scope_3 : {
218218 type : 'boolean' ,
@@ -315,7 +315,7 @@ describe('_INTERNAL_captureLog', () => {
315315 scope . setClient ( client ) ;
316316
317317 scope . setAttribute ( 'scope_1' , 'attribute_value' ) ;
318- scope . setAttribute ( 'scope_2' , { value : 143.5 , type : 'double' , unit : 'bytes ' } ) ;
318+ scope . setAttribute ( 'scope_2' , { value : 38 , unit : 'gigabytes ' } ) ;
319319
320320 _INTERNAL_captureLog (
321321 {
@@ -331,9 +331,9 @@ describe('_INTERNAL_captureLog', () => {
331331 message : 'original message' ,
332332 attributes : {
333333 original : true ,
334- // scope attributes should already be applied prior to beforeSendLog
334+ // attributes here still have the same form as originally set on the scope or log
335335 scope_1 : 'attribute_value' ,
336- scope_2 : { value : 143.5 , type : 'double' , unit : 'bytes ' } ,
336+ scope_2 : { value : 38 , unit : 'gigabytes ' } ,
337337 } ,
338338 } ) ;
339339
@@ -351,6 +351,16 @@ describe('_INTERNAL_captureLog', () => {
351351 value : true ,
352352 type : 'boolean' ,
353353 } ,
354+ // during serialization, they're converted to the typed attribute format
355+ scope_1 : {
356+ value : 'attribute_value' ,
357+ type : 'string' ,
358+ } ,
359+ scope_2 : {
360+ value : 38 ,
361+ unit : 'gigabytes' ,
362+ type : 'integer' ,
363+ } ,
354364 } ,
355365 } ) ,
356366 ) ;
0 commit comments