feat(metrics): Add implementation for metrics envelope item
:scroll: Description
This PR must be merged after #6956 and #6957
:bulb: Motivation and Context
Closes #6951
:green_heart: How did you test it?
:pencil: Checklist
You have to check all boxes before merging:
- [ ] I added tests to verify the changes.
- [ ] No new PII added or SDK only sends newly added PII if
sendDefaultPIIis enabled. - [ ] I updated the docs if needed.
- [ ] I updated the wizard 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.
| Messages | |
|---|---|
| :book: | Do not forget to update Sentry-docs with your feature once the pull request gets approved. |
Generated by :no_entry_sign: dangerJS against 84255ec861c114cf831bd5bbd48b103e924bd427
Codecov Report
:x: Patch coverage is 92.23301% with 8 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 84.972%. Comparing base (e61661b) to head (84255ec).
:white_check_mark: All tests successful. No failed tests found.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| Sources/Sentry/SentryClient.m | 66.666% | 4 Missing :warning: |
| Sources/Sentry/SentryDataCategoryMapper.m | 33.333% | 4 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## philprime/metrics-bootstrap #6960 +/- ##
=================================================================
+ Coverage 84.928% 84.972% +0.044%
=================================================================
Files 458 461 +3
Lines 27635 27730 +95
Branches 12151 12188 +37
=================================================================
+ Hits 23470 23563 +93
- Misses 3907 4127 +220
+ Partials 258 40 -218
| Files with missing lines | Coverage Δ | |
|---|---|---|
| SentryTestUtils/Sources/TestClient.swift | 86.086% <100.000%> (+0.501%) |
:arrow_up: |
| ...ft/Integrations/Metrics/SentryMetricsBatcher.swift | 100.000% <100.000%> (ø) |
|
| ...ntegrations/Metrics/SentryMetricsIntegration.swift | 100.000% <100.000%> (ø) |
|
| Sources/Swift/Protocol/SentryAttribute.swift | 92.187% <ø> (ø) |
|
| Sources/Swift/Protocol/SentryMetric.swift | 100.000% <100.000%> (ø) |
|
| Sources/Swift/Protocol/SentryMetricValue.swift | 100.000% <100.000%> (ø) |
|
| Sources/Swift/SentryDependencyContainer.swift | 98.319% <ø> (ø) |
|
| Sources/Swift/SentryExperimentalOptions.swift | 75.000% <ø> (ø) |
|
| Sources/Swift/Tools/Batcher/BatcherScope.swift | 100.000% <100.000%> (ø) |
|
| Sources/Sentry/SentryClient.m | 98.185% <66.666%> (+0.758%) |
:arrow_up: |
| ... and 1 more |
... and 36 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 dataPowered by Codecov. Last update e61661b...84255ec. Read the comment docs.
@sentry review
@sentry review
@sentry review
@sentry review
Performance metrics :rocket:
| Plain | With Sentry | Diff | |
|---|---|---|---|
| Startup time | 1190.73 ms | 1211.46 ms | 20.72 ms |
| Size | 24.14 KiB | 1.04 MiB | 1.01 MiB |
Baseline results on branch: philprime/metrics-bootstrap
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 2d018e1e8f05f191199b7b1dc2f439ada894b7bc | 1227.67 ms | 1245.79 ms | 18.12 ms |
| c17fb00bdea540635aba2a28b309d05906a33e00 | 1213.18 ms | 1244.28 ms | 31.10 ms |
| 1fc93d0bdb3445096b15fd5db0cd74ec392a73d8 | 1231.06 ms | 1261.37 ms | 30.31 ms |
| b0e93524725794959be3ab81c4bf8fd9bb5d7fda | 1229.50 ms | 1265.81 ms | 36.31 ms |
| 40a71d5221e56bb78349ecc7ad52359a336c0d89 | 1221.24 ms | 1263.70 ms | 42.46 ms |
| 9ee5daea9d275b72eaf3e546614d052b329046ad | 1205.02 ms | 1237.27 ms | 32.25 ms |
| 94a1efd66ca54b59247e16b561208f40f528a899 | 1212.39 ms | 1250.19 ms | 37.80 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 2d018e1e8f05f191199b7b1dc2f439ada894b7bc | 24.14 KiB | 1.03 MiB | 1.01 MiB |
| c17fb00bdea540635aba2a28b309d05906a33e00 | 24.14 KiB | 1.03 MiB | 1.00 MiB |
| 1fc93d0bdb3445096b15fd5db0cd74ec392a73d8 | 24.14 KiB | 1.03 MiB | 1.00 MiB |
| b0e93524725794959be3ab81c4bf8fd9bb5d7fda | 24.14 KiB | 1.03 MiB | 1.01 MiB |
| 40a71d5221e56bb78349ecc7ad52359a336c0d89 | 24.14 KiB | 1.03 MiB | 1.01 MiB |
| 9ee5daea9d275b72eaf3e546614d052b329046ad | 24.14 KiB | 1.03 MiB | 1.01 MiB |
| 94a1efd66ca54b59247e16b561208f40f528a899 | 24.14 KiB | 1.03 MiB | 1.00 MiB |
Previous results on branch: philprime/metrics-envelope
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 63535b82c02e659862de227590d66775f51b534a | 1228.64 ms | 1255.27 ms | 26.63 ms |
| 34e473acf0c2231f4c7aecda08469c51f6b8054e | 1195.53 ms | 1222.53 ms | 27.00 ms |
| f1ee7f4a4a468d79e01d7f9f3841307824f95636 | 1221.29 ms | 1248.16 ms | 26.87 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 63535b82c02e659862de227590d66775f51b534a | 24.14 KiB | 1.04 MiB | 1.01 MiB |
| 34e473acf0c2231f4c7aecda08469c51f6b8054e | 24.14 KiB | 1.04 MiB | 1.01 MiB |
| f1ee7f4a4a468d79e01d7f9f3841307824f95636 | 24.14 KiB | 1.04 MiB | 1.01 MiB |
@sentry review @cursor review