Skip to content

feat: add TagList overload to Metrics-Emit APIs as Attributes parameter#5241

Draft
Flash0ver wants to merge 3 commits into
mainfrom
feat/metrics-system.diagnostics-taglist
Draft

feat: add TagList overload to Metrics-Emit APIs as Attributes parameter#5241
Flash0ver wants to merge 3 commits into
mainfrom
feat/metrics-system.diagnostics-taglist

Conversation

@Flash0ver
Copy link
Copy Markdown
Member

Summary

Add an overload to all Metrics method groups (EmitCounter, EmitGauge, EmitDistribution) that accept Attributes, alongside the existing ReadOnlySpan<> and IEnumerable<> overloads.

Remarks

TODOs

  • Move "EditorBrowsable Never" Attributes to separate PR
  • Verify that we don't run into problems when adding conditionally-compiled non-public abstract methods to a type that is non-constructible by user code, e.g. when having a netstandard2.0 library with a PackageReference to Sentry that is referenced by a net8.0 application that also has a PackageReference to Sentry

@Flash0ver Flash0ver self-assigned this May 18, 2026
@Flash0ver Flash0ver added the public API Additions/modifications to, or removals from, the public API surface area. label May 18, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented May 18, 2026

Codecov Report

❌ Patch coverage is 56.66667% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.19%. Comparing base (7deff34) to head (e08d695).

Files with missing lines Patch % Lines
src/Sentry/Internal/DefaultSentryMetricEmitter.cs 33.33% 4 Missing and 2 partials ⚠️
src/Sentry/Protocol/SentryAttributes.cs 71.42% 1 Missing and 1 partial ⚠️
src/Sentry/SentryMetricEmitter.Distribution.cs 50.00% 2 Missing ⚠️
src/Sentry/SentryMetricEmitter.Gauge.cs 50.00% 2 Missing ⚠️
src/Sentry/Internal/DisabledSentryMetricEmitter.cs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5241      +/-   ##
==========================================
+ Coverage   74.13%   74.19%   +0.06%     
==========================================
  Files         508      508              
  Lines       18282    18312      +30     
  Branches     3574     3580       +6     
==========================================
+ Hits        13553    13587      +34     
+ Misses       3860     3851       -9     
- Partials      869      874       +5     

☔ 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

public API Additions/modifications to, or removals from, the public API surface area.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant