@@ -113,7 +113,7 @@ describe('GCPFunction', () => {
113113      expect ( Sentry . startTransaction ) . toBeCalledWith ( { 
114114        name : 'POST /path' , 
115115        op : 'gcp.function.http' , 
116-         metadata : {  baggage : [ { } ,  '' ,  true ]  } , 
116+         metadata : {  baggage : [ { } ,  '' ,  true ] ,   source :  'route'  } , 
117117      } ) ; 
118118      // @ts -ignore see "Why @ts-ignore" note 
119119      expect ( Sentry . fakeScope . setSpan ) . toBeCalledWith ( Sentry . fakeTransaction ) ; 
@@ -153,6 +153,7 @@ describe('GCPFunction', () => {
153153              '' , 
154154              false , 
155155            ] , 
156+             source : 'route' , 
156157          } , 
157158        } ) , 
158159      ) ; 
@@ -178,7 +179,7 @@ describe('GCPFunction', () => {
178179        traceId : '12312012123120121231201212312012' , 
179180        parentSpanId : '1121201211212012' , 
180181        parentSampled : false , 
181-         metadata : {  baggage : [ { } ,  '' ,  false ]  } , 
182+         metadata : {  baggage : [ { } ,  '' ,  false ] ,   source :  'route'  } , 
182183      } ) ; 
183184      // @ts -ignore see "Why @ts-ignore" note 
184185      expect ( Sentry . fakeScope . setSpan ) . toBeCalledWith ( Sentry . fakeTransaction ) ; 
@@ -245,7 +246,11 @@ describe('GCPFunction', () => {
245246      } ; 
246247      const  wrappedHandler  =  wrapEventFunction ( func ) ; 
247248      await  expect ( handleEvent ( wrappedHandler ) ) . resolves . toBe ( 42 ) ; 
248-       expect ( Sentry . startTransaction ) . toBeCalledWith ( {  name : 'event.type' ,  op : 'gcp.function.event'  } ) ; 
249+       expect ( Sentry . startTransaction ) . toBeCalledWith ( { 
250+         name : 'event.type' , 
251+         op : 'gcp.function.event' , 
252+         metadata : {  source : 'component'  } , 
253+       } ) ; 
249254      // @ts -ignore see "Why @ts-ignore" note 
250255      expect ( Sentry . fakeScope . setSpan ) . toBeCalledWith ( Sentry . fakeTransaction ) ; 
251256      // @ts -ignore see "Why @ts-ignore" note 
@@ -262,7 +267,11 @@ describe('GCPFunction', () => {
262267      } ; 
263268      const  wrappedHandler  =  wrapEventFunction ( handler ) ; 
264269      await  expect ( handleEvent ( wrappedHandler ) ) . rejects . toThrowError ( error ) ; 
265-       expect ( Sentry . startTransaction ) . toBeCalledWith ( {  name : 'event.type' ,  op : 'gcp.function.event'  } ) ; 
270+       expect ( Sentry . startTransaction ) . toBeCalledWith ( { 
271+         name : 'event.type' , 
272+         op : 'gcp.function.event' , 
273+         metadata : {  source : 'component'  } , 
274+       } ) ; 
266275      // @ts -ignore see "Why @ts-ignore" note 
267276      expect ( Sentry . fakeScope . setSpan ) . toBeCalledWith ( Sentry . fakeTransaction ) ; 
268277      expect ( Sentry . captureException ) . toBeCalledWith ( error ) ; 
@@ -284,7 +293,11 @@ describe('GCPFunction', () => {
284293        } ) ; 
285294      const  wrappedHandler  =  wrapEventFunction ( func ) ; 
286295      await  expect ( handleEvent ( wrappedHandler ) ) . resolves . toBe ( 42 ) ; 
287-       expect ( Sentry . startTransaction ) . toBeCalledWith ( {  name : 'event.type' ,  op : 'gcp.function.event'  } ) ; 
296+       expect ( Sentry . startTransaction ) . toBeCalledWith ( { 
297+         name : 'event.type' , 
298+         op : 'gcp.function.event' , 
299+         metadata : {  source : 'component'  } , 
300+       } ) ; 
288301      // @ts -ignore see "Why @ts-ignore" note 
289302      expect ( Sentry . fakeScope . setSpan ) . toBeCalledWith ( Sentry . fakeTransaction ) ; 
290303      // @ts -ignore see "Why @ts-ignore" note 
@@ -305,7 +318,11 @@ describe('GCPFunction', () => {
305318
306319      const  wrappedHandler  =  wrapEventFunction ( handler ) ; 
307320      await  expect ( handleEvent ( wrappedHandler ) ) . rejects . toThrowError ( error ) ; 
308-       expect ( Sentry . startTransaction ) . toBeCalledWith ( {  name : 'event.type' ,  op : 'gcp.function.event'  } ) ; 
321+       expect ( Sentry . startTransaction ) . toBeCalledWith ( { 
322+         name : 'event.type' , 
323+         op : 'gcp.function.event' , 
324+         metadata : {  source : 'component'  } , 
325+       } ) ; 
309326      // @ts -ignore see "Why @ts-ignore" note 
310327      expect ( Sentry . fakeScope . setSpan ) . toBeCalledWith ( Sentry . fakeTransaction ) ; 
311328      expect ( Sentry . captureException ) . toBeCalledWith ( error ) ; 
@@ -324,7 +341,11 @@ describe('GCPFunction', () => {
324341      } ; 
325342      const  wrappedHandler  =  wrapEventFunction ( func ) ; 
326343      await  expect ( handleEvent ( wrappedHandler ) ) . resolves . toBe ( 42 ) ; 
327-       expect ( Sentry . startTransaction ) . toBeCalledWith ( {  name : 'event.type' ,  op : 'gcp.function.event'  } ) ; 
344+       expect ( Sentry . startTransaction ) . toBeCalledWith ( { 
345+         name : 'event.type' , 
346+         op : 'gcp.function.event' , 
347+         metadata : {  source : 'component'  } , 
348+       } ) ; 
328349      // @ts -ignore see "Why @ts-ignore" note 
329350      expect ( Sentry . fakeScope . setSpan ) . toBeCalledWith ( Sentry . fakeTransaction ) ; 
330351      // @ts -ignore see "Why @ts-ignore" note 
@@ -341,7 +362,11 @@ describe('GCPFunction', () => {
341362      } ; 
342363      const  wrappedHandler  =  wrapEventFunction ( handler ) ; 
343364      await  expect ( handleEvent ( wrappedHandler ) ) . rejects . toThrowError ( error ) ; 
344-       expect ( Sentry . startTransaction ) . toBeCalledWith ( {  name : 'event.type' ,  op : 'gcp.function.event'  } ) ; 
365+       expect ( Sentry . startTransaction ) . toBeCalledWith ( { 
366+         name : 'event.type' , 
367+         op : 'gcp.function.event' , 
368+         metadata : {  source : 'component'  } , 
369+       } ) ; 
345370      // @ts -ignore see "Why @ts-ignore" note 
346371      expect ( Sentry . fakeScope . setSpan ) . toBeCalledWith ( Sentry . fakeTransaction ) ; 
347372      expect ( Sentry . captureException ) . toBeCalledWith ( error ) ; 
@@ -359,7 +384,11 @@ describe('GCPFunction', () => {
359384      } ; 
360385      const  wrappedHandler  =  wrapEventFunction ( handler ) ; 
361386      await  expect ( handleEvent ( wrappedHandler ) ) . rejects . toThrowError ( error ) ; 
362-       expect ( Sentry . startTransaction ) . toBeCalledWith ( {  name : 'event.type' ,  op : 'gcp.function.event'  } ) ; 
387+       expect ( Sentry . startTransaction ) . toBeCalledWith ( { 
388+         name : 'event.type' , 
389+         op : 'gcp.function.event' , 
390+         metadata : {  source : 'component'  } , 
391+       } ) ; 
363392      // @ts -ignore see "Why @ts-ignore" note 
364393      expect ( Sentry . fakeScope . setSpan ) . toBeCalledWith ( Sentry . fakeTransaction ) ; 
365394      expect ( Sentry . captureException ) . toBeCalledWith ( error ) ; 
@@ -388,7 +417,11 @@ describe('GCPFunction', () => {
388417      } ; 
389418      const  wrappedHandler  =  wrapCloudEventFunction ( func ) ; 
390419      await  expect ( handleCloudEvent ( wrappedHandler ) ) . resolves . toBe ( 42 ) ; 
391-       expect ( Sentry . startTransaction ) . toBeCalledWith ( {  name : 'event.type' ,  op : 'gcp.function.cloud_event'  } ) ; 
420+       expect ( Sentry . startTransaction ) . toBeCalledWith ( { 
421+         name : 'event.type' , 
422+         op : 'gcp.function.cloud_event' , 
423+         metadata : {  source : 'component'  } , 
424+       } ) ; 
392425      // @ts -ignore see "Why @ts-ignore" note 
393426      expect ( Sentry . fakeScope . setSpan ) . toBeCalledWith ( Sentry . fakeTransaction ) ; 
394427      // @ts -ignore see "Why @ts-ignore" note 
@@ -405,7 +438,11 @@ describe('GCPFunction', () => {
405438      } ; 
406439      const  wrappedHandler  =  wrapCloudEventFunction ( handler ) ; 
407440      await  expect ( handleCloudEvent ( wrappedHandler ) ) . rejects . toThrowError ( error ) ; 
408-       expect ( Sentry . startTransaction ) . toBeCalledWith ( {  name : 'event.type' ,  op : 'gcp.function.cloud_event'  } ) ; 
441+       expect ( Sentry . startTransaction ) . toBeCalledWith ( { 
442+         name : 'event.type' , 
443+         op : 'gcp.function.cloud_event' , 
444+         metadata : {  source : 'component'  } , 
445+       } ) ; 
409446      // @ts -ignore see "Why @ts-ignore" note 
410447      expect ( Sentry . fakeScope . setSpan ) . toBeCalledWith ( Sentry . fakeTransaction ) ; 
411448      expect ( Sentry . captureException ) . toBeCalledWith ( error ) ; 
@@ -424,7 +461,11 @@ describe('GCPFunction', () => {
424461      } ; 
425462      const  wrappedHandler  =  wrapCloudEventFunction ( func ) ; 
426463      await  expect ( handleCloudEvent ( wrappedHandler ) ) . resolves . toBe ( 42 ) ; 
427-       expect ( Sentry . startTransaction ) . toBeCalledWith ( {  name : 'event.type' ,  op : 'gcp.function.cloud_event'  } ) ; 
464+       expect ( Sentry . startTransaction ) . toBeCalledWith ( { 
465+         name : 'event.type' , 
466+         op : 'gcp.function.cloud_event' , 
467+         metadata : {  source : 'component'  } , 
468+       } ) ; 
428469      // @ts -ignore see "Why @ts-ignore" note 
429470      expect ( Sentry . fakeScope . setSpan ) . toBeCalledWith ( Sentry . fakeTransaction ) ; 
430471      // @ts -ignore see "Why @ts-ignore" note 
@@ -441,7 +482,11 @@ describe('GCPFunction', () => {
441482      } ; 
442483      const  wrappedHandler  =  wrapCloudEventFunction ( handler ) ; 
443484      await  expect ( handleCloudEvent ( wrappedHandler ) ) . rejects . toThrowError ( error ) ; 
444-       expect ( Sentry . startTransaction ) . toBeCalledWith ( {  name : 'event.type' ,  op : 'gcp.function.cloud_event'  } ) ; 
485+       expect ( Sentry . startTransaction ) . toBeCalledWith ( { 
486+         name : 'event.type' , 
487+         op : 'gcp.function.cloud_event' , 
488+         metadata : {  source : 'component'  } , 
489+       } ) ; 
445490      // @ts -ignore see "Why @ts-ignore" note 
446491      expect ( Sentry . fakeScope . setSpan ) . toBeCalledWith ( Sentry . fakeTransaction ) ; 
447492      expect ( Sentry . captureException ) . toBeCalledWith ( error ) ; 
@@ -459,7 +504,11 @@ describe('GCPFunction', () => {
459504      } ; 
460505      const  wrappedHandler  =  wrapCloudEventFunction ( handler ) ; 
461506      await  expect ( handleCloudEvent ( wrappedHandler ) ) . rejects . toThrowError ( error ) ; 
462-       expect ( Sentry . startTransaction ) . toBeCalledWith ( {  name : 'event.type' ,  op : 'gcp.function.cloud_event'  } ) ; 
507+       expect ( Sentry . startTransaction ) . toBeCalledWith ( { 
508+         name : 'event.type' , 
509+         op : 'gcp.function.cloud_event' , 
510+         metadata : {  source : 'component'  } , 
511+       } ) ; 
463512      // @ts -ignore see "Why @ts-ignore" note 
464513      expect ( Sentry . fakeScope . setSpan ) . toBeCalledWith ( Sentry . fakeTransaction ) ; 
465514      expect ( Sentry . captureException ) . toBeCalledWith ( error ) ; 
0 commit comments