Skip to content

chore: Refactor SentryAttributes into a separate class#4936

Open
jamescrosswell wants to merge 6 commits intomainfrom
sentry-attributes
Open

chore: Refactor SentryAttributes into a separate class#4936
jamescrosswell wants to merge 6 commits intomainfrom
sentry-attributes

Conversation

@jamescrosswell
Copy link
Copy Markdown
Collaborator

Before closing #4912 I figured we could extract some of the refactorings that might be useful in other PRs dealing with Attributes. Basically there's some functionality that is only accessible in the SentryMetrics class at the moment, but which will be needed by any other classes that also have Attributes.

#skip-changelog

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 19, 2026

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

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


This PR will not appear in the changelog.


🤖 This preview updates automatically when you update the PR.

@jamescrosswell jamescrosswell changed the title Refactored SentryAttributes into a separate class chore: Refactor SentryAttributes into a separate class Feb 19, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 19, 2026

Codecov Report

❌ Patch coverage is 81.25000% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.07%. Comparing base (0b59060) to head (0e0505d).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/Sentry/Protocol/SentryAttributes.cs 76.59% 9 Missing and 2 partials ⚠️
src/Sentry/SentryMetric.Factory.cs 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4936      +/-   ##
==========================================
- Coverage   74.08%   74.07%   -0.02%     
==========================================
  Files         506      507       +1     
  Lines       18247    18234      -13     
  Branches     3564     3559       -5     
==========================================
- Hits        13519    13507      -12     
  Misses       3858     3858              
+ Partials      870      869       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jamescrosswell jamescrosswell marked this pull request as ready for review February 20, 2026 04:39
Comment thread test/Sentry.Testing/SentryAttributesExtensions.cs
Comment thread src/Sentry/Protocol/SentryAttributes.cs
Comment thread src/Sentry/SentryMetric.cs
Comment thread src/Sentry/SentryLog.cs
Comment thread src/Sentry/SentryLog.cs
@jamescrosswell jamescrosswell requested a review from Flash0ver March 5, 2026 22:39
@jamescrosswell
Copy link
Copy Markdown
Collaborator Author

jamescrosswell commented May 6, 2026

@Flash0ver is there any reason not to approve/merge this PR? The changes are internal only (so we can easily refactor again later if we need) and all the tests pass. Can we not just get this out of the way so we can move on to other stuff? It's been waiting for a review for over 2 months now.

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