getsentry / sentry-dart

Sentry SDK for Dart and Flutter
https://sentry.io/for/flutter/
MIT License
766 stars 239 forks source link

Deprecate: metrics api #2312

Closed buenaflor closed 2 months ago

buenaflor commented 2 months ago

In this PR: remove metrics tests, deprecate public metrics api

:scroll: Description

Why we deprecate it: https://sentry.zendesk.com/hc/en-us/articles/26369339769883-Upcoming-API-Changes-to-Metrics

Closes #2277

buenaflor commented 2 months ago

@stefanosiano is this the only place that needs the deprecated tag?

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 87.07%. Comparing base (84c28cd) to head (18dcefb). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #2312 +/- ## ========================================== - Coverage 88.07% 87.07% -1.01% ========================================== Files 247 104 -143 Lines 8607 3706 -4901 ========================================== - Hits 7581 3227 -4354 + Misses 1026 479 -547 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

github-actions[bot] commented 2 months ago

Android Performance metrics :rocket:

  Plain With Sentry Diff
Startup time 483.18 ms 530.14 ms 46.96 ms
Size 6.49 MiB 7.56 MiB 1.07 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
8f88a49d613434f898cd280880fbd122370dfffa 364.98 ms 413.78 ms 48.80 ms
5e8d2b31f616e76a7562ee5349c9eb781ae238a6 342.17 ms 375.83 ms 33.66 ms
2d3b03d17e0b28a698d4de81ab6ac6b586c4533a 309.53 ms 353.40 ms 43.87 ms
c73ab672e1c6c1b4bdea7c2742b4e2d2efcef0ab 353.82 ms 408.71 ms 54.90 ms
5baa2016731c3fe306570ee40d6f18206cf63791 389.26 ms 462.83 ms 73.57 ms
5f2f77becb74ef2093007f845ec89eed6c5a031d 429.06 ms 507.74 ms 78.68 ms
2e1e4aebae075ca46960534a099de7081db831b6 413.34 ms 509.24 ms 95.90 ms
72eeb80900f4f0d40d3e0bd72ce13c1dbf8c1d97 421.38 ms 520.81 ms 99.44 ms
f770c4cf27cf7af52784b27085d7efce09f70004 385.88 ms 449.86 ms 63.98 ms
f2db4ece59961760d0017bb7b0592fc561ab79f0 372.46 ms 469.72 ms 97.26 ms

App size

Revision Plain With Sentry Diff
8f88a49d613434f898cd280880fbd122370dfffa 6.34 MiB 7.30 MiB 979.60 KiB
5e8d2b31f616e76a7562ee5349c9eb781ae238a6 6.15 MiB 7.13 MiB 1000.11 KiB
2d3b03d17e0b28a698d4de81ab6ac6b586c4533a 6.06 MiB 7.09 MiB 1.03 MiB
c73ab672e1c6c1b4bdea7c2742b4e2d2efcef0ab 6.15 MiB 7.13 MiB 999.97 KiB
5baa2016731c3fe306570ee40d6f18206cf63791 6.35 MiB 7.33 MiB 1005.56 KiB
5f2f77becb74ef2093007f845ec89eed6c5a031d 6.35 MiB 7.40 MiB 1.05 MiB
2e1e4aebae075ca46960534a099de7081db831b6 6.35 MiB 7.42 MiB 1.06 MiB
72eeb80900f4f0d40d3e0bd72ce13c1dbf8c1d97 6.35 MiB 7.42 MiB 1.06 MiB
f770c4cf27cf7af52784b27085d7efce09f70004 6.33 MiB 7.26 MiB 950.37 KiB
f2db4ece59961760d0017bb7b0592fc561ab79f0 6.06 MiB 7.03 MiB 990.27 KiB

Previous results on branch: deprecate/metrics

Startup times

Revision Plain With Sentry Diff
935da643b1d2c077da20d97f2c87fc29eb3e24c8 469.32 ms 523.04 ms 53.72 ms
d59414bef0bb7b6bbb126e10cb3a2b04969753f8 523.71 ms 590.06 ms 66.35 ms
3a66f24b943fa8e29a3941a41c505d53c29dd7d7 463.77 ms 523.09 ms 59.31 ms

App size

Revision Plain With Sentry Diff
935da643b1d2c077da20d97f2c87fc29eb3e24c8 6.49 MiB 7.56 MiB 1.07 MiB
d59414bef0bb7b6bbb126e10cb3a2b04969753f8 6.49 MiB 7.56 MiB 1.07 MiB
3a66f24b943fa8e29a3941a41c505d53c29dd7d7 6.49 MiB 7.56 MiB 1.07 MiB
github-actions[bot] commented 2 months ago

iOS Performance metrics :rocket:

  Plain With Sentry Diff
Startup time 1232.10 ms 1260.10 ms 28.00 ms
Size 8.38 MiB 9.74 MiB 1.36 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
039058a03aec95dba9824f86339cbcdb5855b12b 1227.90 ms 1256.23 ms 28.34 ms
691aa3b4663856a2ad6fbf24dec658b7f041d81a 1265.57 ms 1282.13 ms 16.55 ms
8e133ad2c8f1058e17c287ff9685dcca278c7d07 1268.19 ms 1277.37 ms 9.18 ms
5aa047a877938a94fb2be6b2fa165bc503e68f95 1236.57 ms 1241.02 ms 4.45 ms
d5f600b89be5270826f3de928015fdf5a59a9229 1220.79 ms 1232.93 ms 12.14 ms
7f14ddd81bc7debc27cbacd9ae3e1aee159b3aaa 1247.36 ms 1269.89 ms 22.53 ms
c732386ce5f372225fe638c1ded8d02c6e04a8fd 1233.20 ms 1252.08 ms 18.88 ms
d5696bf8f8a938a4260631f8c03ffe7ff590faf0 1232.96 ms 1254.50 ms 21.54 ms
014c3ea4cf506cccc5cfd0eceb6e9b1c1b5fdce9 1298.73 ms 1351.24 ms 52.51 ms
af2d175c1ac16ff4cfdb9504c013db825fe9b436 1280.37 ms 1282.24 ms 1.88 ms

App size

Revision Plain With Sentry Diff
039058a03aec95dba9824f86339cbcdb5855b12b 8.38 MiB 9.71 MiB 1.34 MiB
691aa3b4663856a2ad6fbf24dec658b7f041d81a 8.16 MiB 9.17 MiB 1.01 MiB
8e133ad2c8f1058e17c287ff9685dcca278c7d07 8.10 MiB 9.16 MiB 1.07 MiB
5aa047a877938a94fb2be6b2fa165bc503e68f95 8.29 MiB 9.39 MiB 1.10 MiB
d5f600b89be5270826f3de928015fdf5a59a9229 8.32 MiB 9.38 MiB 1.05 MiB
7f14ddd81bc7debc27cbacd9ae3e1aee159b3aaa 8.33 MiB 9.64 MiB 1.31 MiB
c732386ce5f372225fe638c1ded8d02c6e04a8fd 8.28 MiB 9.33 MiB 1.05 MiB
d5696bf8f8a938a4260631f8c03ffe7ff590faf0 8.38 MiB 9.73 MiB 1.35 MiB
014c3ea4cf506cccc5cfd0eceb6e9b1c1b5fdce9 8.33 MiB 9.39 MiB 1.06 MiB
af2d175c1ac16ff4cfdb9504c013db825fe9b436 8.15 MiB 9.12 MiB 986.22 KiB

Previous results on branch: deprecate/metrics

Startup times

Revision Plain With Sentry Diff
3a66f24b943fa8e29a3941a41c505d53c29dd7d7 1251.10 ms 1276.04 ms 24.94 ms
d59414bef0bb7b6bbb126e10cb3a2b04969753f8 1256.88 ms 1268.69 ms 11.82 ms
935da643b1d2c077da20d97f2c87fc29eb3e24c8 1235.12 ms 1250.37 ms 15.24 ms

App size

Revision Plain With Sentry Diff
3a66f24b943fa8e29a3941a41c505d53c29dd7d7 8.38 MiB 9.74 MiB 1.36 MiB
d59414bef0bb7b6bbb126e10cb3a2b04969753f8 8.38 MiB 9.74 MiB 1.36 MiB
935da643b1d2c077da20d97f2c87fc29eb3e24c8 8.38 MiB 9.74 MiB 1.36 MiB
buenaflor commented 2 months ago

@philipphofmann some of the metrics tests are very flaky (as described here) and metrics in its current state will be gone as a product so these tests won't be useful anymore and only a liability going forward, if we need them for a future implementation we can easily reference them again in the git history

stefanosiano commented 2 months ago

@stefanosiano is this the only place that needs the deprecated tag?

I'd put the Hub.metricsApi() one, too, in case a user uses the hub directly (it should warn the user about it being internal, but let's ensure they know its deprecation)