Skip to content

Support AGENT_OBSERVABILITY_ENABLED for Java (parity with Python ADOT distro) #1383

Description

@maschnetwork

The Python ADOT distro reads AGENT_OBSERVABILITY_ENABLED which is injected by AgentCore Runtime and automatically configures the agent for the CloudWatch GenAI Observability dashboard. The Java agent currently does not provide support for this flag.

Some things that the Python distro does when AGENT_OBSERVABILITY_ENABLED=true:

  1. Adds aws.service.type=gen_ai_agent to the OTel resource (required for the Bedrock AgentCore dashboard tab)
  2. Adds a BaggageSpanProcessor that copies session.id from baggage to span attributes (enables session grouping)
  3. Sets parentbased_always_on sampler (100% span capture)
  4. Disables AWS resource detectors (prevents cloud.platform=aws_ec2 from overriding AgentCore's injected
    cloud.platform=aws_bedrock_agentcore)
  5. Disables Application Signals
  6. Disables noisy HTTP client instrumentation (urllib3/requests)

Reference implementation in the Python distro:

For the Spring AI AgentCore library we built an external extension jar as a workaround but ideally we could get this out of the box: spring-ai-community/spring-ai-agentcore#112

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions