Repository navigation
ref(tracing): Remove unused _get_usage_attributes - #8157
Merged
Merged
Conversation
Co-Authored-By: Ivana Kellyer <ivana.kellyer@sentry.io>
sentrivana
approved these changes
Oct 29, 2026
Contributor
Coverage Results 📊✅ 57523 passed | ⏭️ 2979 skipped | Total: 60502 | Pass Rate: 95.08% | Execution Time: 163m 31s All tests are passing successfully. ✅ Patch coverage is 100.00% (no changed executable lines found; target 80%). Files with missing lines (1)
Coverage diff@@ Coverage Diff @@
## master #8157 +/-##
==========================================
- Coverage 90.33% 90.25% -0.08%
==========================================
Files 203 198 -5
Tracked lines 26872 21290 -5582
Branches 10044 7374 -2670
==========================================
- Hits 24272 19214 -5058
+ Misses 2600 2076 -524
+ Partials 1520 1238 -282Generated by Coverage Action |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Removes the private
_get_usage_attributes()helper fromsentry_sdk/tracing_utils.py. Nothing onmajor/3.0calls it anymore.It pulled
gen_ai.usage.*token counts out of return values for the AI Agents@tracetemplates added in #4676. #7457 ("Remove trace template, trace_ignore_status_codes") deleted the template code that called it, but left the helper behind.Evidence
major/3.0,git grep -w _get_usage_attributesmatches only the definition. There are no callers insentry_sdkortests._get_value()is still imported by the LangChain integration, so it stays.On
masterthe helper is still used, because the trace templates still exist there. This change only applies tomajor/3.0.Issues
n/a
via Ivana Kellyer.
--
View Junior Session [Sentry]