Skip to content

feat: wrappers for async messages methods#4346

Open
eternalcuriouslearner wants to merge 11 commits intoopen-telemetry:mainfrom
eternalcuriouslearner:feat/wrappers-for-async-messages-methods
Open

feat: wrappers for async messages methods#4346
eternalcuriouslearner wants to merge 11 commits intoopen-telemetry:mainfrom
eternalcuriouslearner:feat/wrappers-for-async-messages-methods

Conversation

@eternalcuriouslearner
Copy link
Contributor

Description

This change adds sync and async wrappers for Anthropic message streams, keeps telemetry finalization in the wrapper layer, and adds tests for wrapper behavior. It does not wire the wrappers into instrumentation yet.

Fixes #3949 partly

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • python3 -m pytest -q instrumentation-genai/opentelemetry-instrumentation-anthropic/tests/test_async_wrappers.py
  • python3 -m pytest -q instrumentation-genai/opentelemetry-instrumentation-anthropic/tests/test_sync_messages.py
  • python3 -m pytest -q instrumentation-genai/opentelemetry-instrumentation-anthropic/tests/test_instrumentor.py

Does This PR Require a Core Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

  • Followed the style guidelines of this project
  • Changelogs have been updated
  • Unit tests have been added
  • Documentation has been updated

@eternalcuriouslearner eternalcuriouslearner requested a review from a team as a code owner March 18, 2026 22:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Add OpenTelemetry instrumentation for the Anthropic Claude Python SDK

1 participant