-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Support a list of new AWS resources for AWS Python SDK (#265)
### *Description of changes:* These changes add auto-instrumentation support for the following AWS resources. Additionally, a new attribute for `aws.remote.resource.cfn.primary.identifier` is also added for each new resource. - Populate `aws.sns.topic.arn` in Span by extracting `TopicArn` from the request body. - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sns-topic.html - The CFN Id should be the ARN of the Topic. - Populate `aws.secretsmanager.secret.arn` in Span by extracting `ARN` from response body. - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-secretsmanager-secret.html - The CFN Id should be the ARN of the Secret. - Populate `aws.stepfunctions.state_machine.arn` in Span by extracting `stateMachineArn` from the request body. - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-statemachine.html - The CFN Id should be the ARN of the State Machine. - Populate `aws.stepfunctions.activity.arn` in Span by extracting `activityArn` from the request body. - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-stepfunctions-activity.html - The CFN Id should be the ARN of the Activity. - Populate `aws.lambda.function.name` in Span by extracting `FunctionName` from the request body. - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-function.html - The CFN Id should be the ARN of the Lambda Function. - We populate `aws.lambda.function.arn` in Span by extraction `FunctionArn` from the response body because users are allowed to pass in both the name and ARN in the request body to retrieve the Lambda Function. - Populate `aws.lambda.resource_mapping.id` in Span by extracting `UUID` from the request body. - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-lambda-eventsourcemapping.html - The CFN Id should be the UUID of the Event Source Mapping. ### *Test Plan:* Set up a client-server with auto-instrumentation to verify that the correct span data is being generated. ![sns_topic_arn_span_data_verification](https://github.com/user-attachments/assets/f744ef66-169e-4056-9151-eb17d74258c8) ![secretsmanager_secret_arn_span_data_verification](https://github.com/user-attachments/assets/ee3cd0d6-3ecd-4f55-8471-b69eea4a369a) ![sfn_statemachine_arn_span_data_verification](https://github.com/user-attachments/assets/cd857153-c61c-4368-9d9f-eb91a90dc0f3) ![sfn_activity_arn_span_data_verification](https://github.com/user-attachments/assets/6e5d20d3-00c4-4dc2-a692-91e26e1f13f3) ![lambda_function_name_span_data_verification](https://github.com/user-attachments/assets/d019c94a-b944-4fa3-be62-b80ab3209899) ![lambda_event_source_mapping_uuid_span_data_verification](https://github.com/user-attachments/assets/968f0488-9440-457a-828e-1a1e4e6f2c5f) Unit Tests for Instrumentation Patches and AWS Metric Attribute Generators. ![instrumentation_patch_unit_test_verification](https://github.com/user-attachments/assets/5322a47e-dc7e-4b67-9c6f-158cffde6787) ![aws_metric_attribute_generator_unit_test_verification](https://github.com/user-attachments/assets/8672e0d6-eb05-424c-9005-281c239053c0) By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
- Loading branch information
Showing
5 changed files
with
330 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.