fix(dart): Add span v2 envelope metadata#3700
Draft
buenaflor wants to merge 1 commit into
Draft
Conversation
Include the span v2 payload version and automatic ingest settings when building pre-encoded span envelope items. Co-Authored-By: GPT-5.5 <noreply@openai.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
Semver Impact of This PR🟢 Patch (bug fixes) 📋 Changelog PreviewThis is how your changes will appear in the changelog. Fixes
🤖 This preview updates automatically when you update the PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3700 +/- ##
==========================================
- Coverage 86.96% 86.85% -0.12%
==========================================
Files 335 335
Lines 11976 11988 +12
==========================================
- Hits 10415 10412 -3
- Misses 1561 1576 +15
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Contributor
iOS Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 1adf565 | 1264.51 ms | 1265.22 ms | 0.71 ms |
| d789735 | 1240.58 ms | 1246.41 ms | 5.82 ms |
| 2f63d89 | 1251.67 ms | 1263.94 ms | 12.27 ms |
| cdf371b | 1246.24 ms | 1251.10 ms | 4.86 ms |
| fd88186 | 1255.06 ms | 1252.76 ms | -2.30 ms |
| ce5c42b | 1246.06 ms | 1251.91 ms | 5.85 ms |
| e5ae2a6 | 1240.48 ms | 1253.26 ms | 12.78 ms |
| 944b773 | 1252.82 ms | 1254.08 ms | 1.27 ms |
| 73dca78 | 1246.65 ms | 1265.42 ms | 18.76 ms |
| 7cfbbd6 | 1270.63 ms | 1285.36 ms | 14.72 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 1adf565 | 5.66 MiB | 6.10 MiB | 451.33 KiB |
| d789735 | 5.53 MiB | 5.96 MiB | 443.28 KiB |
| 2f63d89 | 5.65 MiB | 6.09 MiB | 446.25 KiB |
| cdf371b | 5.53 MiB | 6.02 MiB | 501.23 KiB |
| fd88186 | 5.53 MiB | 6.00 MiB | 479.94 KiB |
| ce5c42b | 5.73 MiB | 6.17 MiB | 455.86 KiB |
| e5ae2a6 | 5.65 MiB | 6.09 MiB | 446.96 KiB |
| 944b773 | 5.53 MiB | 6.00 MiB | 479.98 KiB |
| 73dca78 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
| 7cfbbd6 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
Contributor
Android Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| bfabaf2 | 408.04 ms | 444.38 ms | 36.34 ms |
| fec56a1 | 370.66 ms | 369.28 ms | -1.38 ms |
| 8541716 | 437.14 ms | 443.65 ms | 6.51 ms |
| 0fb45d0 | 482.79 ms | 554.02 ms | 71.23 ms |
| 0fb3800 | 465.64 ms | 536.77 ms | 71.13 ms |
| e04b24b | 504.72 ms | 516.43 ms | 11.71 ms |
| 944b773 | 470.54 ms | 480.18 ms | 9.64 ms |
| cdf371b | 367.64 ms | 377.02 ms | 9.38 ms |
| 0bea8d9 | 389.45 ms | 394.96 ms | 5.50 ms |
| 5b9a0da | 446.94 ms | 449.22 ms | 2.28 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| bfabaf2 | 13.93 MiB | 15.06 MiB | 1.13 MiB |
| fec56a1 | 14.31 MiB | 15.49 MiB | 1.19 MiB |
| 8541716 | 13.93 MiB | 15.00 MiB | 1.06 MiB |
| 0fb45d0 | 6.54 MiB | 7.70 MiB | 1.17 MiB |
| 0fb3800 | 6.54 MiB | 7.69 MiB | 1.15 MiB |
| e04b24b | 13.93 MiB | 15.00 MiB | 1.06 MiB |
| 944b773 | 13.93 MiB | 15.00 MiB | 1.06 MiB |
| cdf371b | 13.93 MiB | 15.18 MiB | 1.25 MiB |
| 0bea8d9 | 14.31 MiB | 15.56 MiB | 1.25 MiB |
| 5b9a0da | 13.93 MiB | 14.93 MiB | 1.00 MiB |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📜 Description
Add the span v2 envelope item container metadata required by Relay for pre-encoded span batches.
Span v2 envelope item payloads now include
version: 2andingest_settingswith automatic IP and user-agent inference, while logs and metrics continue to use the plainitemscontainer.💡 Motivation and Context
Fixes #3690.
The span v2 envelope item payload contract requires top-level
versionandingest_settingsfields in addition to theitemsarray. Without these fields, span v2 batches do not fully match the expected ingest payload shape.💚 How did you test it?
fvm dart format lib/src/sentry_envelope.dart test/sentry_envelope_test.dartfvm dart analyze lib/src/sentry_envelope.dart test/sentry_envelope_test.dartfvm dart test test/sentry_envelope_test.dart📝 Checklist
sendDefaultPiiis enabled🔮 Next steps
Made with Cursor