Skip to content

chore: Remove ai.monitoring.record_token_usage() - #7553

Draft
alexander-alderman-webb wants to merge 8 commits into
major/3.0from
webb/remove-record-token-usage
Draft

alexander-alderman-webb wants to merge 8 commits into
major/3.0from
webb/remove-record-token-usage

Conversation

@alexander-alderman-webb

@alexander-alderman-webb alexander-alderman-webb commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Description

Inline uses of ai.monitoring.record_token_usage() and remove the function.

Issues

Closes #6894

Reminders

@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Codecov Results 📊

✅ 55903 passed | ⏭️ 2727 skipped | Total: 58630 | Pass Rate: 95.35% | Execution Time: 153m 28s

📊 Comparison with Base Branch

Metric Change
Total Tests 📉 -81755
Passed Tests 📉 -77259
Failed Tests 📉 -1
Skipped Tests 📉 -4495

➖ Removed Tests (1)

View removed tests
  • test_cache_spans_decorator[True]
    • File: tests.integrations.django.test_cache_module

All tests are passing successfully.

✅ Patch coverage is 83.95%. Project has 2083 uncovered lines.
❌ Project coverage is 89.96%. Comparing base (a3135ed) to head (ef36b98).

Files with missing lines (5)
File Patch % Lines
sentry_sdk/integrations/cohere.py 60.00% ⚠️ 6 Missing and 4 partials
sentry_sdk/integrations/huggingface_hub.py 76.19% ⚠️ 5 Missing and 5 partials
sentry_sdk/integrations/litellm.py 90.91% ⚠️ 1 Missing and 4 partials
sentry_sdk/integrations/openai.py 95.83% ⚠️ 1 Missing and 3 partials
sentry_sdk/integrations/anthropic.py 100.00% ⚠️ 3 partials
Coverage diff
@@            Coverage Diff             @@
##        master       #PR       +/-##
==========================================
- Coverage    90.37%    89.96%    -0.41%
==========================================
  Files          202       184       -18
  Lines        26552     20752     -5800
  Branches      9858      7194     -2664
==========================================
+ Hits         23997     18669     -5328
- Misses        2555      2083      -472
- Partials      1487      1231      -256

Generated by Codecov Action

@alexander-alderman-webb
alexander-alderman-webb marked this pull request as ready for review October 6, 2026 15:28
@alexander-alderman-webb
alexander-alderman-webb requested a review from a team as a code owner October 6, 2026 15:28
@alexander-alderman-webb

Copy link
Copy Markdown
Contributor Author

I'll inline on master instead so we can deprecate.

@alexander-alderman-webb
alexander-alderman-webb marked this pull request as draft October 7, 2026 13:50

This branch has not been deployed

No deployments
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