Skip to content

Conversation

@yiyuan-he
Copy link

@yiyuan-he yiyuan-he commented Oct 9, 2024

Summary of Changes:

  • Updating the CFN Primary Id for Guardrail to be the ARN. (Verified this in the AWS Cloudformation Console)

    Screenshot 2024-10-09 at 12 44 12 PM

  • Updated BEDROCKAGENTOPERATION enum.

    • Our Bedrock Agent Runtime should support both Agent Operation and KnowledgeBased Operation like in Java SDK v1.

Related changes in ADOT package: aws-observability/aws-otel-java-instrumentation#905

Testing Plan:

Set up sample apps and manually verified correct span attributes were generated via auto-instrumentation.

Java SDK v1
bedrock-guardrail-span-data-verification-v1

Java SDK v2
bedrock-guardrail-span-data-verification-v2

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@mxiamxia mxiamxia merged commit 170b4c2 into mxiamxia:v1_32_1_dev Oct 11, 2024
25 of 46 checks passed
mxiamxia added a commit to aws-observability/aws-otel-java-instrumentation that referenced this pull request Oct 12, 2024
### *Summary of Changes:*

- Updating the CFN Primary Id for Guardrail to be the ARN. (Verified
this in the AWS Cloudformation Console)

![Screenshot 2024-10-09 at 12 44
12 PM](https://github.com/user-attachments/assets/1a7437f1-4269-42f0-b4d9-db9f5f37b3a7)

- Updated `BEDROCKAGENTOPERATION` enum.
- Our Bedrock Agent Runtime should support both Agent Operation and
KnowledgeBased Operation [like in Java SDK
v1](https://github.com/mxiamxia/opentelemetry-java-instrumentation/blob/965f7878c79c2be5851f23cf272edd39585f42af/instrumentation/aws-sdk/aws-sdk-1.11/library/src/main/java/io/opentelemetry/instrumentation/awssdk/v1_11/AwsSdkExperimentalAttributesExtractor.java#L133).

Related changes in upstream package:
mxiamxia/opentelemetry-java-instrumentation#13

### *Testing Plan:*

Set up sample apps and manually verified correct span attributes were
generated via auto-instrumentation.

`Java SDK v1`

![bedrock-guardrail-span-data-verification-v1](https://github.com/user-attachments/assets/70b2c126-cf73-4a70-b63f-e4cd78101604)

`Java SDK v2`

![bedrock-guardrail-span-data-verification-v2](https://github.com/user-attachments/assets/d4857400-3f78-4e5d-aa1a-bb0d26b6213e)


By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license.

Co-authored-by: Min Xia <[email protected]>
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.

3 participants