Draft
Conversation
- Parse org_id from DSN host (e.g. `o123.ingest.sentry.io` → `123`) - Add `strictTraceContinuation` and `orgId` options to SentryOptions - Propagate `sentry-org_id` in baggage/DSC - Validate incoming traces: mismatched org IDs start a new trace; strict mode also rejects traces with missing org IDs Spec: https://develop.sentry.dev/sdk/foundations/trace-propagation/#strict-trace-continuation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
|
Contributor
iOS Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 5a95d04 | 1263.17 ms | 1265.37 ms | 2.20 ms |
| 73a3c38 | 1263.37 ms | 1277.90 ms | 14.53 ms |
| 4298701 | 1243.56 ms | 1262.29 ms | 18.72 ms |
| f872f8e | 1253.29 ms | 1250.49 ms | -2.80 ms |
| 3135a81 | 1258.11 ms | 1247.48 ms | -10.63 ms |
| cdf371b | 1246.24 ms | 1251.10 ms | 4.86 ms |
| a909995 | 1259.83 ms | 1258.66 ms | -1.17 ms |
| 765aa8b | 1259.09 ms | 1269.90 ms | 10.82 ms |
| 53356d8 | 1235.14 ms | 1254.39 ms | 19.24 ms |
| 0fb3800 | 1256.60 ms | 1266.28 ms | 9.68 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 5a95d04 | 5.53 MiB | 6.01 MiB | 487.81 KiB |
| 73a3c38 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
| 4298701 | 20.70 MiB | 22.46 MiB | 1.76 MiB |
| f872f8e | 5.53 MiB | 5.96 MiB | 444.81 KiB |
| 3135a81 | 5.73 MiB | 6.17 MiB | 453.76 KiB |
| cdf371b | 5.53 MiB | 6.02 MiB | 501.23 KiB |
| a909995 | 5.66 MiB | 6.10 MiB | 451.85 KiB |
| 765aa8b | 7.86 MiB | 9.44 MiB | 1.58 MiB |
| 53356d8 | 5.66 MiB | 6.10 MiB | 451.56 KiB |
| 0fb3800 | 7.86 MiB | 9.44 MiB | 1.58 MiB |
Previous results on branch: feat/strict-trace-continuation
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| f96a725 | 1263.67 ms | 1268.90 ms | 5.22 ms |
| 7c249a7 | 1234.02 ms | 1237.81 ms | 3.79 ms |
| 80a6525 | 1251.04 ms | 1249.98 ms | -1.06 ms |
| e3bfa44 | 1238.25 ms | 1234.53 ms | -3.72 ms |
| a48e7d7 | 1239.53 ms | 1238.38 ms | -1.16 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| f96a725 | 5.73 MiB | 6.17 MiB | 456.50 KiB |
| 7c249a7 | 5.73 MiB | 6.17 MiB | 456.52 KiB |
| 80a6525 | 5.73 MiB | 6.17 MiB | 456.50 KiB |
| e3bfa44 | 5.73 MiB | 6.17 MiB | 456.50 KiB |
| a48e7d7 | 5.73 MiB | 6.17 MiB | 456.50 KiB |
6 tasks
Contributor
Android Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| ebccb5b | 363.79 ms | 371.10 ms | 7.31 ms |
| cdf371b | 367.64 ms | 377.02 ms | 9.38 ms |
| 51520fc | 351.89 ms | 349.79 ms | -2.10 ms |
| a34fde0 | 393.60 ms | 389.96 ms | -3.65 ms |
| aeb02f2 | 373.84 ms | 437.00 ms | 63.16 ms |
| c26ed0a | 465.52 ms | 476.38 ms | 10.86 ms |
| 1f639ee | 429.98 ms | 476.60 ms | 46.62 ms |
| 640ad0c | 466.00 ms | 552.67 ms | 86.67 ms |
| 4e14113 | 361.52 ms | 353.19 ms | -8.33 ms |
| 8775665 | 415.88 ms | 439.26 ms | 23.38 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| ebccb5b | 13.93 MiB | 15.18 MiB | 1.25 MiB |
| cdf371b | 13.93 MiB | 15.18 MiB | 1.25 MiB |
| 51520fc | 13.93 MiB | 15.18 MiB | 1.25 MiB |
| a34fde0 | 14.09 MiB | 15.28 MiB | 1.19 MiB |
| aeb02f2 | 6.54 MiB | 7.69 MiB | 1.15 MiB |
| c26ed0a | 13.93 MiB | 14.93 MiB | 1.00 MiB |
| 1f639ee | 13.93 MiB | 15.00 MiB | 1.06 MiB |
| 640ad0c | 6.54 MiB | 7.69 MiB | 1.15 MiB |
| 4e14113 | 14.09 MiB | 15.28 MiB | 1.19 MiB |
| 8775665 | 13.93 MiB | 15.18 MiB | 1.25 MiB |
Previous results on branch: feat/strict-trace-continuation
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| f96a725 | 411.33 ms | 420.06 ms | 8.73 ms |
| 7c249a7 | 366.72 ms | 369.06 ms | 2.34 ms |
| e3bfa44 | 390.52 ms | 373.63 ms | -16.89 ms |
| 80a6525 | 386.66 ms | 386.65 ms | -0.01 ms |
| a48e7d7 | 371.18 ms | 361.09 ms | -10.09 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| f96a725 | 14.31 MiB | 15.49 MiB | 1.19 MiB |
| 7c249a7 | 14.31 MiB | 15.49 MiB | 1.19 MiB |
| e3bfa44 | 14.31 MiB | 15.49 MiB | 1.19 MiB |
| 80a6525 | 14.31 MiB | 15.49 MiB | 1.19 MiB |
| a48e7d7 | 14.31 MiB | 15.49 MiB | 1.19 MiB |
6 tasks
antonis
commented
Mar 17, 2026
Author
antonis
left a comment
There was a problem hiding this comment.
@buenaflor heads up that this is a fully AI generated implementation of the Strict Trace Continuation feature using the feature implementation skill
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
antonis
commented
Mar 26, 2026
Author
antonis
left a comment
There was a problem hiding this comment.
Moving this back to draft to also handle the Android/iOS native dependencies.
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
Implement Strict Trace Continuation in the Dart SDK.
Changes:
dsn.dart— Extract org_id from DSN host using^o(\d+)\.regexsentry_options.dart— AddstrictTraceContinuation(bool),orgId(String?), andeffectiveOrgIdgettersentry_baggage.dart— Addsentry-org_idget/set, propagate insetValuesFromScopesentry_trace_context_header.dart— AddorgIdfield, propagate through JSON/baggage serializationsentry_tracer.dart— Include org_id when creating trace context headerstracing_utils.dart— AddshouldContinueTrace()implementing the decision matrixsentry_transaction_context.dart— Validate org ID infromSentryTrace, start new trace on mismatch💡 Motivation and Context
Prevents cross-organization trace continuation by validating org IDs in distributed traces. When org IDs don't match, the SDK starts a fresh trace instead of continuing the foreign one.
Part of the Strict Trace Continuation initiative.
💚 How did you test it?
strict_trace_continuation_test.dart) covering:📝 Checklist
sendDefaultPiiis enabled🔮 Next steps