Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(metrics): Add rate limits #3838

Merged
merged 1 commit into from Apr 9, 2024
Merged

Conversation

philipphofmann
Copy link
Member

📜 Description

This adds the handling of rate limits for the new metric_bucket category, including handling the metric namespace.

💡 Motivation and Context

Fixes GH-3805

💚 How did you test it?

Unit tests

📝 Checklist

You have to check all boxes before merging:

  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.

🔮 Next steps

This adds the handling of rate limits for the new metric_bucket category
including handling the metric namespace.

Fixes GH-3805
Copy link

github-actions bot commented Apr 8, 2024

Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 6733b7f

Copy link

codecov bot commented Apr 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.961%. Comparing base (9ce54cc) to head (6733b7f).

Additional details and impacted files

Impacted file tree graph

@@              Coverage Diff              @@
##              main     #3838       +/-   ##
=============================================
+ Coverage   90.944%   90.961%   +0.017%     
=============================================
  Files          560       560               
  Lines        44216     44256       +40     
  Branches     15764     15771        +7     
=============================================
+ Hits         40212     40256       +44     
+ Misses        3824      3821        -3     
+ Partials       180       179        -1     
Files Coverage Δ
Sources/Sentry/SentryDataCategoryMapper.m 98.275% <100.000%> (ø)
Sources/Sentry/SentryRateLimitParser.m 100.000% <100.000%> (ø)
...king/RateLimits/SentryDefaultRateLimitsTests.swift 100.000% <100.000%> (ø)
...sts/Networking/SentryDataCategoryMapperTests.swift 100.000% <100.000%> (ø)
...tryTests/Networking/SentryHttpTransportTests.swift 99.664% <100.000%> (+0.003%) ⬆️

... and 3 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 9ce54cc...6733b7f. Read the comment docs.

Copy link

github-actions bot commented Apr 8, 2024

Performance metrics 🚀

  Plain With Sentry Diff
Startup time 1236.58 ms 1255.33 ms 18.75 ms
Size 21.58 KiB 573.85 KiB 552.26 KiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
af1f4dd 1225.39 ms 1245.48 ms 20.09 ms
b15521e 1224.44 ms 1251.13 ms 26.68 ms
6e342ac 1202.98 ms 1228.74 ms 25.76 ms
0204c72 1196.45 ms 1208.92 ms 12.47 ms
66922ca 1221.68 ms 1235.98 ms 14.30 ms
02a972c 1207.08 ms 1221.78 ms 14.70 ms
dc0fe58 1198.56 ms 1220.98 ms 22.42 ms
1ee3d54 1241.80 ms 1250.67 ms 8.87 ms
bb5dc7d 1240.44 ms 1266.45 ms 26.01 ms
05644fe 1244.04 ms 1244.46 ms 0.42 ms

App size

Revision Plain With Sentry Diff
af1f4dd 22.85 KiB 414.71 KiB 391.86 KiB
b15521e 21.58 KiB 573.18 KiB 551.60 KiB
6e342ac 20.76 KiB 436.66 KiB 415.90 KiB
0204c72 21.58 KiB 540.04 KiB 518.45 KiB
66922ca 20.76 KiB 425.80 KiB 405.04 KiB
02a972c 22.85 KiB 413.42 KiB 390.57 KiB
dc0fe58 20.76 KiB 436.50 KiB 415.74 KiB
1ee3d54 21.58 KiB 571.76 KiB 550.18 KiB
bb5dc7d 22.85 KiB 412.98 KiB 390.13 KiB
05644fe 22.85 KiB 408.88 KiB 386.03 KiB

@philipphofmann philipphofmann merged commit c0f08e7 into main Apr 9, 2024
68 of 70 checks passed
@philipphofmann philipphofmann deleted the feat/metric-rate-limits branch April 9, 2024 09:54
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.

Metrics Rate Limits
2 participants