Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused code blocks for Bedrock Agent instrumentation #159

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ezhang6811
Copy link
Contributor

Description of changes:
The initial instrumentation for Bedrock Agent was intended to extract only one attribute per operation, despite cases where two or more attributes exist in the request or response bodies. To implement this, we created OperationNameToResourceMap to associate each Bedrock Agent function with exactly one attribute.

However, the recently added CFN Primary Identifier attribute contains a special case for data source operations, for which the identifier has format: <KnowledgeBaseId>|<DataSourceId> (see #142). Because both attributes are needed in order to form the CFN Primary ID, the previous one-attribute restriction was lifted and the Bedrock Agent-specific logic for attribute extraction was no longer needed. This PR removes the obsolete functions and structures that are no longer utilized after the implementation of the CFN Primary ID.

The E2E test result below provides a sanity check that a given Bedrock Agent operation can extract multiple aws.bedrock.* attributes and does not rely on the deleted code.
image

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@ezhang6811 ezhang6811 requested a review from a team as a code owner January 6, 2025 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants