@@ -1179,34 +1179,13 @@ def test_sdk_client_span_with_remote_resource_attributes(self):
11791179 )
11801180 self ._mock_attribute ([AWS_SECRETSMANAGER_SECRET_ARN ], [None ])
11811181
1182- # Validate behaviour of AWS_SECRETSMANAGER_SECRET_ARN attribute with special chars, then remove it.
1183- self ._mock_attribute (
1184- [AWS_SECRETSMANAGER_SECRET_ARN ],
1185- ["arn:aws:secretsmanager:us-east-1:123456789012:secret:secret|name^test-lERW9H" ],
1186- keys ,
1187- values ,
1188- )
1189- self ._validate_remote_resource_attributes (
1190- "AWS::SecretsManager::Secret" ,
1191- "secret^|name^^test-lERW9H" ,
1192- "arn:aws:secretsmanager:us-east-1:123456789012:secret:secret^|name^^test-lERW9H" ,
1193- )
1194- self ._mock_attribute ([AWS_SECRETSMANAGER_SECRET_ARN ], [None ])
1195-
11961182 # Validate behaviour of AWS_SNS_TOPIC_ARN attribute, then remove it.
11971183 self ._mock_attribute ([AWS_SNS_TOPIC_ARN ], ["arn:aws:sns:us-west-2:012345678901:test_topic" ], keys , values )
11981184 self ._validate_remote_resource_attributes (
11991185 "AWS::SNS::Topic" , "test_topic" , "arn:aws:sns:us-west-2:012345678901:test_topic"
12001186 )
12011187 self ._mock_attribute ([AWS_SNS_TOPIC_ARN ], [None ])
12021188
1203- # Validate behaviour of AWS_SNS_TOPIC_ARN attribute with special chars, then remove it.
1204- self ._mock_attribute ([AWS_SNS_TOPIC_ARN ], ["arn:aws:sns:us-west-2:012345678901:test|topic^name" ], keys , values )
1205- self ._validate_remote_resource_attributes (
1206- "AWS::SNS::Topic" , "test^|topic^^name" , "arn:aws:sns:us-west-2:012345678901:test^|topic^^name"
1207- )
1208- self ._mock_attribute ([AWS_SNS_TOPIC_ARN ], [None ])
1209-
12101189 # Validate behaviour of AWS_STEPFUNCTIONS_STATEMACHINE_ARN attribute, then remove it.
12111190 self ._mock_attribute (
12121191 [AWS_STEPFUNCTIONS_STATEMACHINE_ARN ],
@@ -1221,20 +1200,6 @@ def test_sdk_client_span_with_remote_resource_attributes(self):
12211200 )
12221201 self ._mock_attribute ([AWS_STEPFUNCTIONS_STATEMACHINE_ARN ], [None ])
12231202
1224- # Validate behaviour of AWS_STEPFUNCTIONS_STATEMACHINE_ARN attribute with special chars, then remove it.
1225- self ._mock_attribute (
1226- [AWS_STEPFUNCTIONS_STATEMACHINE_ARN ],
1227- ["arn:aws:states:us-east-1:123456789012:stateMachine:test|state^machine" ],
1228- keys ,
1229- values ,
1230- )
1231- self ._validate_remote_resource_attributes (
1232- "AWS::StepFunctions::StateMachine" ,
1233- "test^|state^^machine" ,
1234- "arn:aws:states:us-east-1:123456789012:stateMachine:test^|state^^machine" ,
1235- )
1236- self ._mock_attribute ([AWS_STEPFUNCTIONS_STATEMACHINE_ARN ], [None ])
1237-
12381203 # Validate behaviour of AWS_STEPFUNCTIONS_ACTIVITY_ARN attribute, then remove it.
12391204 self ._mock_attribute (
12401205 [AWS_STEPFUNCTIONS_ACTIVITY_ARN ],
@@ -1249,28 +1214,20 @@ def test_sdk_client_span_with_remote_resource_attributes(self):
12491214 )
12501215 self ._mock_attribute ([AWS_STEPFUNCTIONS_ACTIVITY_ARN ], [None ])
12511216
1252- # Validate behaviour of AWS_STEPFUNCTIONS_ACTIVITY_ARN attribute with special chars, then remove it.
1253- self ._mock_attribute (
1254- [AWS_STEPFUNCTIONS_ACTIVITY_ARN ],
1255- ["arn:aws:states:us-east-1:007003123456789012:activity:test|Activity^name" ],
1256- keys ,
1257- values ,
1258- )
1259- self ._validate_remote_resource_attributes (
1260- "AWS::StepFunctions::Activity" ,
1261- "test^|Activity^^name" ,
1262- "arn:aws:states:us-east-1:007003123456789012:activity:test^|Activity^^name" ,
1263- )
1264- self ._mock_attribute ([AWS_STEPFUNCTIONS_ACTIVITY_ARN ], [None ])
1265-
12661217 # Validate behaviour of AWS_LAMBDA_RESOURCEMAPPING_ID attribute, then remove it.
12671218 self ._mock_attribute ([AWS_LAMBDA_RESOURCEMAPPING_ID ], ["aws_event_source_mapping_id" ], keys , values )
12681219 self ._validate_remote_resource_attributes ("AWS::Lambda::EventSourceMapping" , "aws_event_source_mapping_id" )
12691220 self ._mock_attribute ([AWS_LAMBDA_RESOURCEMAPPING_ID ], [None ])
12701221
1271- # Validate behaviour of AWS_LAMBDA_RESOURCEMAPPING_ID attribute with special chars, then remove it.
1272- self ._mock_attribute ([AWS_LAMBDA_RESOURCEMAPPING_ID ], ["aws_event|source^mapping_id" ], keys , values )
1273- self ._validate_remote_resource_attributes ("AWS::Lambda::EventSourceMapping" , "aws_event^|source^^mapping_id" )
1222+ # Validate behaviour of AWS_LAMBDA_RESOURCE_MAPPING_ID,
1223+ # then remove it.
1224+ self ._mock_attribute (
1225+ [AWS_LAMBDA_RESOURCEMAPPING_ID ],
1226+ ["aws_event_source_mapping_id" ],
1227+ keys ,
1228+ values ,
1229+ )
1230+ self ._validate_remote_resource_attributes ("AWS::Lambda::EventSourceMapping" , "aws_event_source_mapping_id" )
12741231 self ._mock_attribute ([AWS_LAMBDA_RESOURCEMAPPING_ID ], [None ])
12751232
12761233 # Test AWS Lambda Invoke scenario with default lambda remote environment
@@ -1362,41 +1319,6 @@ def test_sdk_client_span_with_remote_resource_attributes(self):
13621319 [None , None , None , None , None ],
13631320 )
13641321
1365- # Validate behaviour of AWS_LAMBDA_NAME for non-Invoke operations with special chars
1366- self ._mock_attribute (
1367- [
1368- SpanAttributes .RPC_SYSTEM ,
1369- SpanAttributes .RPC_SERVICE ,
1370- SpanAttributes .RPC_METHOD ,
1371- AWS_LAMBDA_FUNCTION_NAME ,
1372- AWS_LAMBDA_FUNCTION_ARN ,
1373- ],
1374- [
1375- "aws-api" ,
1376- "Lambda" ,
1377- "GetFunction" ,
1378- "test|Lambda^Name" ,
1379- "arn:aws:lambda:us-east-1:123456789012:function:test|Lambda^Name" ,
1380- ],
1381- keys ,
1382- values ,
1383- )
1384- self ._validate_remote_resource_attributes (
1385- "AWS::Lambda::Function" ,
1386- "test^|Lambda^^Name" ,
1387- "arn:aws:lambda:us-east-1:123456789012:function:test^|Lambda^^Name" ,
1388- )
1389- self ._mock_attribute (
1390- [
1391- SpanAttributes .RPC_SYSTEM ,
1392- SpanAttributes .RPC_SERVICE ,
1393- SpanAttributes .RPC_METHOD ,
1394- AWS_LAMBDA_FUNCTION_NAME ,
1395- AWS_LAMBDA_FUNCTION_ARN ,
1396- ],
1397- [None , None , None , None , None ],
1398- )
1399-
14001322 # Validate that Lambda Invoke with function name treats Lambda as a service, not a resource
14011323 self ._mock_attribute (
14021324 [
0 commit comments