Skip to content

Consolidate Log Group and Log Stream Config [WIP] #376

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

Open
wants to merge 1 commit into
base: genesis-dev-v2
Choose a base branch
from

Conversation

yiyuan-he
Copy link
Contributor

What does this pull request do?

In the agent observability path, customers are expected to set:

AGENT_OBSERVABILITY_ENABLED=true
OTEL_RESOURCE_ATTRIBUTES="service.name=<TicketingAgent>,aws.log.group.names=</aws/genesis/TicketingAgent>,aws.log.stream.names=<stream_name>"

Previously, they also needed to manually set OTEL_EXPORTER_OTLP_LOGS_HEADERS with the same log group and stream values. This PR eliminates that redundancy by automatically inferring the headers from the resource attributes.

Changes:

  • Added automatic inference of OTEL_EXPORTER_OTLP_LOGS_HEADERS from OTEL_RESOURCE_ATTRIBUTES when:
    • AGENT_OBSERVABILITY_ENABLED is set to true
    • OTEL_EXPORTER_OTLP_LOGS_HEADERS is not explicitly set
  • The inference extracts aws.log.group.names and aws.log.stream.names from resource attributes and maps them to the required OTLP headers (x-aws-log-group and x-aws-log-stream)
  • Explicit OTEL_EXPORTER_OTLP_LOGS_HEADERS values still take priority over inferred values, maintaining backward compatability

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 May 28, 2025 18:26
@yiyuan-he yiyuan-he requested a review from mxiamxia May 28, 2025 18:34
@yiyuan-he yiyuan-he force-pushed the consolidate-log-config branch from 3e5ceb4 to c0156a2 Compare May 28, 2025 18:48
@yiyuan-he yiyuan-he changed the title Consolidate Log Group and Log Stream Config Consolidate Log Group and Log Stream Config [WIP] May 28, 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.

1 participant