Skip to content

refactor(sdk): call span handle members directly in the python integrations - #198

Merged
aikins01 merged 1 commit into
mainfrom
refactor/sdk-python/drop-handle-fallbacks
Nov 4, 2026
Merged

aikins01 merged 1 commit into
mainfrom
refactor/sdk-python/drop-handle-fallbacks

Conversation

@aikins01

@aikins01 aikins01 commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

The bedrock, google-genai, litellm and openrouter integrations now call SpanHandle.capture_masked, SpanHandle.record_output_chunk and SpanHandle.capture_output directly, and bedrock reads Client.mask directly, the way anthropic and openai already do. The getattr fallbacks they replace were written for cores without these members, but every integration requires telemetry-dev>=0.3.0, and the published 0.3.0 wheel has all four. This settles the Python compatibility item in #83.

Behavior doesn't change. With 0.3.0 from PyPI, a handle from a disabled client reports capture_masked and capture_output as false and accepts record_output_chunk. A handle from a client with a mask reports capture_masked as true. The fallbacks for CaptureBudget.for_stream, CaptureBudget.reserve_bytes and prompt_attributes_for stay, because 0.3.0 doesn't have those.

Refs #83

@aikins01 aikins01 self-assigned this Nov 4, 2026
@aikins01
aikins01 merged commit 3196738 into main Nov 4, 2026
10 checks passed
@aikins01
aikins01 deleted the refactor/sdk-python/drop-handle-fallbacks branch November 4, 2026 02:06
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