Skip to content

chore: Remove GenAI input truncation functions - #7442

Merged
alexander-alderman-webb merged 5 commits into
major/3.0from
webb/remove-truncation
Sep 9, 2026
Merged

chore: Remove GenAI input truncation functions#7442
alexander-alderman-webb merged 5 commits into
major/3.0from
webb/remove-truncation

Conversation

@alexander-alderman-webb

Copy link
Copy Markdown
Contributor

Description

Remove dead truncation code.
Both truncate_and_annotate_messages() and truncate_and_annotate_embedding_inputs() were only used in the static trace lifecycle. This lifecycle is dropped in the major.

Issues

Reminders

@alexander-alderman-webb
alexander-alderman-webb requested a review from a team as a code owner September 9, 2026 11:05
@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Codecov Results 📊

71053 passed | ⏭️ 3374 skipped | Total: 74427 | Pass Rate: 95.47% | Execution Time: 219m 9s

📊 Comparison with Base Branch

Metric Change
Total Tests 📉 -64609
Passed Tests 📉 -60852
Failed Tests
Skipped Tests 📉 -3757

All tests are passing successfully.

✅ Patch coverage is 100.00%. Project has 2240 uncovered lines.
❌ Project coverage is 90.14%. Comparing base (d0f63fb) to head (d6c5a55).

Files with missing lines (5)
File Patch % Lines
sentry_sdk/integrations/langchain.py 100.00% ⚠️ 4 partials
sentry_sdk/integrations/langgraph.py 100.00% ⚠️ 2 partials
sentry_sdk/integrations/litellm.py 100.00% ⚠️ 2 partials
sentry_sdk/integrations/openai_agents/spans/invoke_agent.py 100.00% ⚠️ 1 partials
sentry_sdk/integrations/openai_agents/utils.py 100.00% ⚠️ 1 partials
Coverage diff
@@            Coverage Diff             @@
##        master       #PR       +/-##
==========================================
- Coverage    90.20%    90.14%    -0.06%
==========================================
  Files          193       185        -8
  Lines        25788     22720     -3068
  Branches      9530      8268     -1262
==========================================
+ Hits         23261     20480     -2781
- Misses        2527      2240      -287
- Partials      1432      1337       -95

Generated by Codecov Action

Base automatically changed from webb/remove-get-start-span-function to major/3.0 September 9, 2026 11:32

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit c094138. Configure here.

Comment thread sentry_sdk/ai/utils.py
Comment thread tests/test_ai_monitoring.py

@sentrivana sentrivana left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Beautiful!

LGTM, might be my #7449 will be superfluous after this.

@alexander-alderman-webb alexander-alderman-webb changed the title chore: Remove truncation functions and helpers chore: Remove GenAI input truncation functions Sep 9, 2026
@alexander-alderman-webb
alexander-alderman-webb merged commit da4ae1c into major/3.0 Sep 9, 2026
149 checks passed
@alexander-alderman-webb
alexander-alderman-webb deleted the webb/remove-truncation branch September 9, 2026 14:20
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.

2 participants