@@ -27,8 +27,6 @@ import { SinonStub } from 'sinon';
2727const _STREAM_NAME : string = 'streamName' ;
2828const _BUCKET_NAME : string = 'bucketName' ;
2929const _QUEUE_NAME : string = 'queueName' ;
30- const _FUNCTION_NAME : string = 'testFunction' ;
31- const _FUNCTION_ARN : string = `arn:aws:lambda:us-east-1:123456789012:function:${ _FUNCTION_NAME } ` ;
3230const _ACTIVITY_ARN : string = 'arn:aws:states:us-east-1:007003123456789012:activity:testActivity' ;
3331const _STATE_MACHINE_ARN : string = 'arn:aws:states:us-east-1:007003123456789012:stateMachine:testStateMachine' ;
3432const _SECRETS_ARN : string = 'arn:aws:secretsmanager:us-east-1:123456789123:secret:testId123456' ;
@@ -66,7 +64,6 @@ describe('InstrumentationPatchTest', () => {
6664 // From patching but shouldn't be applied
6765 expect ( services . get ( 'SNS' ) . requestPreSpanHook ) . toBeTruthy ( ) ;
6866 expect ( services . get ( 'Lambda' ) . requestPreSpanHook ) . toBeTruthy ( ) ;
69- expect ( services . get ( 'Lambda' ) . responseHook ) . toBeTruthy ( ) ;
7067 expect ( services . get ( 'SecretsManager' ) ) . toBeFalsy ( ) ;
7168 expect ( services . get ( 'SFN' ) ) . toBeFalsy ( ) ;
7269 expect ( services . has ( 'S3' ) ) . toBeFalsy ( ) ;
@@ -94,7 +91,6 @@ describe('InstrumentationPatchTest', () => {
9491 // From patching
9592 expect ( services . get ( 'SNS' ) . requestPreSpanHook ) . toBeTruthy ( ) ;
9693 expect ( services . get ( 'Lambda' ) . requestPreSpanHook ) . toBeTruthy ( ) ;
97- expect ( services . get ( 'Lambda' ) . responseHook ) . toBeTruthy ( ) ;
9894 expect ( services . has ( 'SecretsManager' ) ) . toBeTruthy ( ) ;
9995 expect ( services . has ( 'SFN' ) ) . toBeTruthy ( ) ;
10096 expect ( services . has ( 'S3' ) ) . toBeTruthy ( ) ;
@@ -150,8 +146,6 @@ describe('InstrumentationPatchTest', () => {
150146 expect ( ( ) => doExtractLambdaAttributes ( services ) ) . not . toThrow ( ) ;
151147
152148 const lambdaAttributes : Attributes = doExtractLambdaAttributes ( services ) ;
153- expect ( lambdaAttributes [ AWS_ATTRIBUTE_KEYS . AWS_LAMBDA_FUNCTION_NAME ] ) . toBeUndefined ( ) ;
154- expect ( lambdaAttributes [ AWS_ATTRIBUTE_KEYS . AWS_LAMBDA_FUNCTION_ARN ] ) . toBeUndefined ( ) ;
155149 expect ( lambdaAttributes [ AWS_ATTRIBUTE_KEYS . AWS_LAMBDA_RESOURCE_MAPPING_ID ] ) . toBeUndefined ( ) ;
156150 } ) ;
157151
@@ -215,13 +209,7 @@ describe('InstrumentationPatchTest', () => {
215209 const patchedAwsSdkInstrumentation : AwsInstrumentation = extractAwsSdkInstrumentation ( PATCHED_INSTRUMENTATIONS ) ;
216210 const services : Map < string , any > = extractServicesFromAwsSdkInstrumentation ( patchedAwsSdkInstrumentation ) ;
217211 const requestLambdaAttributes : Attributes = doExtractLambdaAttributes ( services ) ;
218- expect ( requestLambdaAttributes [ AWS_ATTRIBUTE_KEYS . AWS_LAMBDA_FUNCTION_ARN ] ) . toBeUndefined ( ) ;
219- expect ( requestLambdaAttributes [ AWS_ATTRIBUTE_KEYS . AWS_LAMBDA_FUNCTION_NAME ] ) . toEqual ( _FUNCTION_NAME ) ;
220212 expect ( requestLambdaAttributes [ AWS_ATTRIBUTE_KEYS . AWS_LAMBDA_RESOURCE_MAPPING_ID ] ) . toEqual ( _UUID ) ;
221-
222- const responseLambdaAttributes = doResponseHookLambda ( services ) ;
223-
224- expect ( responseLambdaAttributes [ AWS_ATTRIBUTE_KEYS . AWS_LAMBDA_FUNCTION_ARN ] ) . toEqual ( _FUNCTION_ARN ) ;
225213 } ) ;
226214
227215 it ( 'SFN with patching' , ( ) => {
@@ -415,7 +403,6 @@ describe('InstrumentationPatchTest', () => {
415403 serviceName : serviceName ,
416404 commandName : 'mockCommandName' ,
417405 commandInput : {
418- FunctionName : _FUNCTION_ARN ,
419406 UUID : _UUID ,
420407 } ,
421408 } ;
@@ -479,23 +466,6 @@ describe('InstrumentationPatchTest', () => {
479466 return requestMetadata . spanAttributes || { } ;
480467 }
481468
482- function doResponseHookLambda ( services : Map < string , ServiceExtension > ) : Attributes {
483- const results : Partial < NormalizedResponse > = {
484- data : {
485- Configuration : {
486- FunctionArn : _FUNCTION_ARN ,
487- } ,
488- } ,
489- request : {
490- commandInput : { } ,
491- commandName : 'dummy_operation' ,
492- serviceName : 'Lambda' ,
493- } ,
494- } ;
495-
496- return doResponseHook ( services , 'Lambda' , results as NormalizedResponse ) ;
497- }
498-
499469 function doResponseHookSecretsManager ( services : Map < string , ServiceExtension > ) : Attributes {
500470 const results : Partial < NormalizedResponse > = {
501471 data : {
0 commit comments