-
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: Add CFN Primary ID for Existing Supported AWS Resources (#264)
### *Description of changes:* These changes support AWS Resources with different CFN Identifier formats. This new attribute will have the key `aws.remote.resource.cfn.primary.identifier`. More context can be found in the comments of this closed PR: #261 In most cases, this new attribute should have the same value as the existing attribute `aws.remote.resource.identifier`. However, there are some edge cases we must handle as seen in this PR: - `AWS::SQS::Queue` - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sqs-queue.html - The CFN Id should be the URL of the Queue. - `AWS::Bedrock::DataSource` - https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-bedrock-datasource.html - The CFN Id should be a compound value where the knowledge base Id and the data source Id are separated by `|` Also updated Bedrock Agent request parameters to also include Knowledge Base ID: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/bedrock-agent/client/get_data_source.html ### *Test Plan:* Set up a client-server with auto-instrumentation to verify that the correct span data is being generated. ![bedrock_cfn_primary_id_verification](https://github.com/user-attachments/assets/9a375751-a70c-41ab-896a-00e26a5fcc76) ![sqs_cfn_primary_id_verification](https://github.com/user-attachments/assets/a8ee28b0-4344-4f48-82b7-a100da939860) Unit tests for instrumentation ![metric_generator_unit_test_verification](https://github.com/user-attachments/assets/52c26651-068d-4d40-a020-69714feab17c) ![instrumentation_patch_unit_test_verification](https://github.com/user-attachments/assets/3c23031d-52c2-49e6-9285-da679351ae0d) 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
49 additions
and
7 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
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