File tree Expand file tree Collapse file tree 4 files changed +12
-6
lines changed Expand file tree Collapse file tree 4 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -410,7 +410,8 @@ class Tracer extends Utility implements TracerInterface {
410410 subsegment ?. close ( ) ;
411411 } catch ( error ) {
412412 console . warn (
413- `Failed to close or serialize segment, ${ subsegment ?. name } . We are catching the error but data might be lost.` ,
413+ `Failed to close or serialize segment %s. We are catching the error but data might be lost.` ,
414+ subsegment ?. name ,
414415 error
415416 ) ;
416417 }
@@ -499,7 +500,8 @@ class Tracer extends Utility implements TracerInterface {
499500 subsegment ?. close ( ) ;
500501 } catch ( error ) {
501502 console . warn (
502- `Failed to close or serialize segment, ${ subsegment ?. name } . We are catching the error but data might be lost.` ,
503+ `Failed to close or serialize segment %s. We are catching the error but data might be lost.` ,
504+ subsegment ?. name ,
503505 error
504506 ) ;
505507 }
Original file line number Diff line number Diff line change @@ -74,7 +74,8 @@ const captureLambdaHandler = (
7474 handlerSegment . close ( ) ;
7575 } catch ( error ) {
7676 console . warn (
77- `Failed to close or serialize segment, ${ handlerSegment . name } . We are catching the error but data might be lost.` ,
77+ `Failed to close or serialize segment %s. We are catching the error but data might be lost.` ,
78+ handlerSegment . name ,
7879 error
7980 ) ;
8081 }
Original file line number Diff line number Diff line change @@ -953,7 +953,8 @@ describe('Class: Tracer', () => {
953953 expect ( closeSpy ) . toHaveBeenCalledTimes ( 1 ) ;
954954 expect ( logWarningSpy ) . toHaveBeenNthCalledWith (
955955 1 ,
956- `Failed to close or serialize segment, ${ handlerSubsegment . name } . We are catching the error but data might be lost.` ,
956+ `Failed to close or serialize segment %s. We are catching the error but data might be lost.` ,
957+ handlerSubsegment . name ,
957958 new Error ( 'dummy error' )
958959 ) ;
959960 } ) ;
@@ -1414,7 +1415,8 @@ describe('Class: Tracer', () => {
14141415 expect ( closeSpy ) . toHaveBeenCalledTimes ( 1 ) ;
14151416 expect ( logWarningSpy ) . toHaveBeenNthCalledWith (
14161417 1 ,
1417- `Failed to close or serialize segment, ${ handlerSubsegment . name } . We are catching the error but data might be lost.` ,
1418+ `Failed to close or serialize segment %s. We are catching the error but data might be lost.` ,
1419+ handlerSubsegment . name ,
14181420 new Error ( 'dummy error' )
14191421 ) ;
14201422 } ) ;
Original file line number Diff line number Diff line change @@ -405,7 +405,8 @@ describe('Middy middleware', () => {
405405 expect ( closeSpy ) . toHaveBeenCalledTimes ( 1 ) ;
406406 expect ( logWarningSpy ) . toHaveBeenNthCalledWith (
407407 1 ,
408- `Failed to close or serialize segment, ${ handlerSubsegment . name } . We are catching the error but data might be lost.` ,
408+ `Failed to close or serialize segment %s. We are catching the error but data might be lost.` ,
409+ handlerSubsegment . name ,
409410 new Error ( 'dummy error' )
410411 ) ;
411412 // Check that the segments are restored
You can’t perform that action at this time.
0 commit comments