Skip to content

feat: Send GenAI spans as V2 envelope items#6079

Draft
alexander-alderman-webb wants to merge 12 commits intomasterfrom
webb/gen-ai-v2
Draft

feat: Send GenAI spans as V2 envelope items#6079
alexander-alderman-webb wants to merge 12 commits intomasterfrom
webb/gen-ai-v2

Conversation

@alexander-alderman-webb
Copy link
Copy Markdown
Contributor

Description

Issues

Reminders

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 15, 2026

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

  • (ci) Cancel in-progress PR workflows on new commit push by joshuarli in #5994
  • Send GenAI spans as V2 envelope items by alexander-alderman-webb in #6079

Bug Fixes 🐛

  • (google_genai) Redact binary data in inline_data and fix multi-part message extraction by ericapisani in #5977
  • (grpc) Add isolation_scope to async server interceptor by robinvd in #5940
  • (profiler) Stop nulling buffer on teardown by ericapisani in #6075

Internal Changes 🔧

  • (celery) Remove unused NoOpMgr from utils by sentrivana in #6078
  • (pydantic-ai) Remove dead Model.request patch by alexander-alderman-webb in #5956
  • (tests) Replace deprecated enable_tracingwith traces_sample_rate by sentrivana in #6077
  • Set explicit base-branch for codecov action by ericapisani in #5992

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 15, 2026

Codecov Results 📊

13 passed | Total: 13 | Pass Rate: 100% | Execution Time: 7.48s

All tests are passing successfully.

❌ Patch coverage is 19.30%. Project has 15120 uncovered lines.

Files with missing lines (1)
File Patch % Lines
client.py 47.85% ⚠️ 339 Missing and 61 partials

Generated by Codecov Action

Comment thread sentry_sdk/client.py Outdated
Comment thread sentry_sdk/client.py Outdated
Comment thread sentry_sdk/client.py Outdated
Comment thread sentry_sdk/client.py
Comment thread sentry_sdk/client.py Outdated
Comment thread sentry_sdk/client.py
Comment thread sentry_sdk/client.py
"role": "user",
"parts": [{"inline_data": {"data": b"binary_data", "mime_type": "image/gif"}}],
"parts": [
{"inline_data": {"attributes": b"binary_data", "mime_type": "image/gif"}}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test uses wrong key 'attributes' instead of 'data' for inline_data

The test changed the inline_data dict key from data to attributes, but the actual implementation in transform_google_content_part (sentry_sdk/ai/utils.py:286) expects inline_data.get("data", ""). Other tests in the same file (lines 1765, 1806) correctly use data. This change means the test no longer validates the real inline_data handling path - the content field would be set to an empty string instead of testing the binary data substitution.

Verification

Read transform_google_content_part in sentry_sdk/ai/utils.py which shows the expected format is {"inline_data": {"mime_type": "...", "data": "..."}} (line 260) and the code accesses inline_data.get("data", "") at line 286. Also verified other tests in the same file use "data" not "attributes" (lines 1765, 1806).

Identified by Warden code-review · NUR-Y7U

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