Skip to content

fix(metrics)!: Remove unit from public API for counter#7358

Merged
philprime merged 3 commits intomainfrom
philprime/remove-metric-unit-counter
Feb 4, 2026
Merged

fix(metrics)!: Remove unit from public API for counter#7358
philprime merged 3 commits intomainfrom
philprime/remove-metric-unit-counter

Conversation

@philprime
Copy link
Copy Markdown
Member

@philprime philprime commented Feb 3, 2026

📜 Description

This PR introduces a breaking change of the experimental public API of metrics by removing the optional parameter unit for collecting counter metrics.

💡 Motivation and Context

During revision of the Method Signatures of the metrics API in the develop docs it was surfaced to me that count metrics do not accept a Metric Unit.

💚 How did you test it?

Tested via unit tests

Closes #7359

@philprime philprime self-assigned this Feb 3, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 3, 2026

Semver Impact of This PR

🔴 Major (breaking changes)

📋 Changelog Preview

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


Breaking Changes 🛠

  • (metrics) Remove unit from public API for counter by philprime in #7358

Bug Fixes 🐛

  • In_foreground and is_active app context by philipphofmann in #7188

Internal Changes 🔧

Deps

  • Bump getsentry/craft/.github/workflows/changelog-preview.yml from 2.20.0 to 2.20.1 by dependabot in #7344
  • Bump mikepenz/action-junit-report from 6.1.0 to 6.2.0 by dependabot in #7346

Other

  • Update React Native branch to v8 by itaybre in #7356
  • IPhone 16 Pro default in xcodebuild.sh by philipphofmann in #7348
  • Update GA workflow to use reat native branch with v9 by itaybre in #7342
  • ObjC Integration cleanup by itaybre in #7320

🤖 This preview updates automatically when you update the PR.

@philprime philprime requested a review from cleptric February 3, 2026 13:42
@philprime philprime marked this pull request as ready for review February 3, 2026 13:42
@philprime philprime added the ready-to-merge Use this label to trigger all PR workflows label Feb 3, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.250%. Comparing base (62649f7) to head (434cfb5).
⚠️ Report is 7 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #7358       +/-   ##
=============================================
+ Coverage   85.243%   85.250%   +0.007%     
=============================================
  Files          477       477               
  Lines        28577     28577               
  Branches     12418     12420        +2     
=============================================
+ Hits         24360     24362        +2     
+ Misses        4173      4168        -5     
- Partials        44        47        +3     
Files with missing lines Coverage Δ
Sources/Swift/Helper/SentrySDK.swift 84.259% <ø> (ø)
.../Swift/Integrations/Metrics/SentryMetricsApi.swift 100.000% <100.000%> (ø)
...ntegrations/Metrics/SentryMetricsApiProtocol.swift 100.000% <100.000%> (ø)

... and 5 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 62649f7...434cfb5. Read the comment docs.

Copy link
Copy Markdown
Member

@philipphofmann philipphofmann left a comment

Choose a reason for hiding this comment

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

LGTM

@philprime philprime enabled auto-merge (squash) February 3, 2026 14:19
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 3, 2026

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1216.98 ms 1245.73 ms 28.76 ms
Size 24.14 KiB 1.10 MiB 1.08 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
7714225 1213.24 ms 1252.28 ms 39.04 ms
1357911 1222.84 ms 1258.38 ms 35.54 ms
45eb835 1210.40 ms 1233.39 ms 22.99 ms
d540ef3 1214.37 ms 1241.06 ms 26.69 ms
b8fcca6 1228.85 ms 1259.59 ms 30.74 ms
ffe0649 1213.35 ms 1248.64 ms 35.29 ms
5ca545a 1219.06 ms 1244.59 ms 25.53 ms
015d376 1187.58 ms 1211.28 ms 23.70 ms
c519f01 1211.75 ms 1244.48 ms 32.73 ms
1357911 1224.57 ms 1261.00 ms 36.43 ms

App size

Revision Plain With Sentry Diff
7714225 24.14 KiB 1.07 MiB 1.05 MiB
1357911 24.14 KiB 1.07 MiB 1.04 MiB
45eb835 24.14 KiB 1.07 MiB 1.04 MiB
d540ef3 24.14 KiB 1.07 MiB 1.04 MiB
b8fcca6 24.14 KiB 1.08 MiB 1.06 MiB
ffe0649 24.14 KiB 1.06 MiB 1.04 MiB
5ca545a 24.14 KiB 1.06 MiB 1.04 MiB
015d376 24.14 KiB 1.09 MiB 1.07 MiB
c519f01 24.14 KiB 1.08 MiB 1.06 MiB
1357911 24.14 KiB 1.07 MiB 1.04 MiB

@philprime philprime merged commit 24f94fe into main Feb 4, 2026
251 of 258 checks passed
@philprime philprime deleted the philprime/remove-metric-unit-counter branch February 4, 2026 09:15
@jpnurmi jpnurmi mentioned this pull request Feb 4, 2026
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Use this label to trigger all PR workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix(metrics)!: Remove unit from public API for counter

2 participants