Skip to content

[Feature Request]: AnthropicConfig open_telemetry option #3490

Closed

Description

@vvlrff

Is your feature request related to a problem? Please describe.

anthropic-sdk-python 1.14 added native OpenTelemetry tracing, on by default. With a global tracer provider registered, the SDK creates an anthropic.messages.create CLIENT span (scope com.anthropic.sdk.python) and sends a traceparent header. I confirmed this on 1.17.0 with an in-memory exporter: the span is nested under the current span, which with TelemetryMiddleware is ag2's own chat span, so it adds a child rather than duplicating.

Users can switch it off only with the ANTHROPIC_OPEN_TELEMETRY=false environment variable. AnthropicConfig does not expose the SDK's open_telemetry client option.

Describe the solution you'd like

Expose open_telemetry on AnthropicConfig (pass-through to the client) and mention the new SDK spans and the opt-out in the telemetry docs.

Additional context

Not checked: whether any existing ag2 test or user assertion depends on the number of spans per request.

Activity

  1. added
    type:featureNew functionality or API extension
    status:needs-triageNew: waiting for triage; humans pick it up from here
    on Oct 24, 2026
  2. added a commit that references this issue on Oct 27, 2026
    4faabe7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    status:needs-triageNew: waiting for triage; humans pick it up from heretype:featureNew functionality or API extension

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions