Skip to content

refactor(weave): migrate Claude Agent SDK tracing to GenAI SDK - #7642

Merged
rgao-coreweave merged 5 commits into
masterfrom
rgao/claude-agent-sdk-python-weave-genai
Jul 29, 2026
Merged

refactor(weave): migrate Claude Agent SDK tracing to GenAI SDK#7642
rgao-coreweave merged 5 commits into
masterfrom
rgao/claude-agent-sdk-python-weave-genai

Conversation

@rgao-coreweave

@rgao-coreweave rgao-coreweave commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Migrate the Python Claude Agent SDK OTel integration to Weave GenAI Conversation, Turn, LLM, and Tool handles.
  • Preserve conversation IDs, model and tool spans, usage, errors, integration metadata, and custom agent names.
  • Keep gen_ai.provider.name on child chat spans only. The root invoke_agent Turn is an internal span and has no single provider because one turn can use multiple model providers.
  • Leave the legacy calls-based integration unchanged.

Standards alignment

The root Turn follows the current OpenTelemetry internal-agent convention, which omits gen_ai.provider.name: open-telemetry/semantic-conventions-genai#289

Stack

Testing

  • uv run --no-sync --group test python -m pytest tests/integrations/claude_agent_sdk/claude_agent_sdk_otel_test.py -q (15 passed)
  • nox --no-install -e lint (ty, import-linter, pyright, mypy, Ruff, and formatting passed before restack)

Breaking changes

None.

@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 81.48148% with 10 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
.../integrations/claude_agent_sdk/otel_integration.py 81.48% 7 Missing and 3 partials ⚠️

📢 Thoughts on this report? Let us know!

@w-b-hivemind

w-b-hivemind Bot commented Jul 28, 2026

Copy link
Copy Markdown

HiveMind Sessions

13 sessions · 2h 25m · $92

Session Agent Duration Tokens Cost Lines
Analyze Image and Audio File Metadata
cdb48d48-04e1-4f7b-9023-d6236d017fc9
claude 52s 2.2K $0.75 +0 -0
Image and Audio File Analysis
cf9902e8-64f4-48f9-b324-b956545921f9
claude 1m 2.2K $1.06 +0 -0
Move and Timestamp Markdown Files in Rgao cursor 59s 29.9K $0.11 +19 -1
Analyze Image and Audio File Metadata
8b7e6ea1-0710-4a2d-a240-3f27268fce48
claude 1m 1.8K $0.71 +0 -0
Image and Audio File Analysis
711d1b34-c8ef-4194-81ce-1038cb6c6b2e
claude 1m 2.1K $0.53 +0 -0
Claude Agent SDK Multimedia Integration Example
019fab40-3b94-7570-934c-656cee2b23b8
codex 56m 1.1M $31 +1234 -505
Claude Agent SDK OTel Integration Improvements
019faad7-3c2d-7bc3-8827-67e1bbf718bc
codex 34m 749.3K $20 +205 -134
Exploring TypeScript Project Structure
8ff16f2a-7563-4dbd-96c8-9195e9798ac1
claude 45s 1.9K $0.53 +0 -0
List TypeScript Files in Directory
824f9f5d-70f3-49e6-856e-78b428b51b6c
claude 0s 0 $0.00 +0 -0
Weave Package Installation and Compatibility Check
019fa9c5-1401-7533-939d-bdfd9fa1623c
codex 5m 209.4K $3.52 +0 -0
Verify Weave 0.53.3 Package Installation
5b784e05-a4f2-40f8-af85-fa3595b2cb85
claude 0s 0 $0.00 +0 -0
List TypeScript Files in Directory
a4bfb37f-e19e-4e88-a20d-54eb33585478
claude 0s 0 $0.00 +0 -0
Migrate Claude Agent SDK to Weave Python SDK
019fa5b6-70f3-7513-98c0-ecb7ac4eb49c
codex 43m 2.1M $33 +610 -339
Total 2h 25m 4.2M $92 +2068 -979
Screenshots

View all sessions in HiveMind →

Run claude --resume cdb48d48-04e1-4f7b-9023-d6236d017fc9 or codex resume 019fab40-3b94-7570-934c-656cee2b23b8 to pickup where you left off.

@rgao-coreweave
rgao-coreweave force-pushed the rgao/claude-agent-sdk-python-weave-genai branch from 775c568 to 7cf1710 Compare July 28, 2026 01:01
@rgao-coreweave
rgao-coreweave changed the base branch from master to rgao/python-turn-output-messages July 28, 2026 01:01
Base automatically changed from rgao/python-turn-output-messages to master July 28, 2026 01:36
@rgao-coreweave
rgao-coreweave force-pushed the rgao/claude-agent-sdk-python-weave-genai branch 4 times, most recently from f298699 to eac8216 Compare July 28, 2026 23:08
@rgao-coreweave
rgao-coreweave force-pushed the rgao/claude-agent-sdk-python-weave-genai branch from 250b3bc to 889a4f8 Compare July 28, 2026 23:55
@rgao-coreweave
rgao-coreweave changed the base branch from master to rgao/python-turn-provider-name July 28, 2026 23:55
@rgao-coreweave
rgao-coreweave marked this pull request as ready for review July 29, 2026 00:03
@rgao-coreweave
rgao-coreweave requested a review from a team as a code owner July 29, 2026 00:03
@rgao-coreweave
rgao-coreweave requested a review from a team July 29, 2026 00:04
@rgao-coreweave
rgao-coreweave force-pushed the rgao/claude-agent-sdk-python-weave-genai branch from 28c2971 to 8822dc0 Compare July 29, 2026 00:37
@rgao-coreweave
rgao-coreweave changed the base branch from rgao/python-turn-provider-name to master July 29, 2026 00:37
@rgao-coreweave
rgao-coreweave force-pushed the rgao/claude-agent-sdk-python-weave-genai branch from ca43457 to 93b60ec Compare July 29, 2026 20:19
@rgao-coreweave
rgao-coreweave merged commit 3ae3d49 into master Jul 29, 2026
109 checks passed
@rgao-coreweave
rgao-coreweave deleted the rgao/claude-agent-sdk-python-weave-genai branch July 29, 2026 22:18
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 29, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants