Skip to content

Conversation

@yiyuan-he
Copy link
Contributor

@yiyuan-he yiyuan-he commented Jun 4, 2025

What does this pull request do?

Configures span pipeline for BedrockAgentCore to send traces to OTLP X-Ray endpoint when AGENT_OBSERVABILITY_ENABLED is enabled. We also pass an instance of logger_provider to our custom OTLP Span Exporter since we may need to emit input/output responses to the logs pipeline.

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

@yiyuan-he yiyuan-he requested a review from a team as a code owner June 4, 2025 22:34
Copy link
Contributor

@thpierce thpierce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview is a bit confusing. The only thing we are doing is: If flag set, add the default logger provider to span exporter. The overview links to https://opentelemetry.io/docs/specs/semconv/gen-ai/gen-ai-events/ as justificaiton for this change, but that page does not mention log anywhere.

In short: I don't know why we are making this change.

@yiyuan-he
Copy link
Contributor Author

Overview is a bit confusing. The only thing we are doing is: If flag set, add the default logger provider to span exporter. The overview links to https://opentelemetry.io/docs/specs/semconv/gen-ai/gen-ai-events/ as justificaiton for this change, but that page does not mention log anywhere.

In short: I don't know why we are making this change.

Upstream OTel has decided for input/output prompt data in Spans, they will split it into events (which are really just logs with a format that OTel can make guarantees about). The reason we need to add a logger provider to the Span pipeline is to split the input/output prompt data from the spans in our OTLPAwsSpanExporter and send to the logs pipeline.

@mxiamxia
Copy link
Member

Overview is a bit confusing. The only thing we are doing is: If flag set, add the default logger provider to span exporter. The overview links to https://opentelemetry.io/docs/specs/semconv/gen-ai/gen-ai-events/ as justificaiton for this change, but that page does not mention log anywhere.
In short: I don't know why we are making this change.

Upstream OTel has decided for input/output prompt data in Spans, they will split it into events (which are really just logs with a format that OTel can make guarantees about). The reason we need to add a logger provider to the Span pipeline is to split the input/output prompt data from the spans in our OTLPAwsSpanExporter and send to the logs pipeline.

Left a comment to the lines of code where I think we can add a high level explanations why logger provider is needed agent case,

thpierce
thpierce previously approved these changes Jun 10, 2025
@yiyuan-he yiyuan-he merged commit 8644e08 into aws-observability:main Jun 10, 2025
11 checks passed
@yiyuan-he yiyuan-he deleted the setup-genesis-pipelines branch June 11, 2025 04:17
@yiyuan-he yiyuan-he changed the title Configure Span Pipeline for Genesis Configure Span Pipeline for BedrockAgentCore Jul 21, 2025
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