-
-
Notifications
You must be signed in to change notification settings - Fork 285
feat: Implement strict trace continuation #3567
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
Merged
Merged
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
7e891ab
feat: Implement strict trace continuation
antonis a48e7d7
fix: Apply dart format and update changelog PR number
antonis 80a6525
fix: Apply dart format to test file
antonis f96a725
fix: Remove unnecessary import flagged by dart analyzer
antonis 7c249a7
fix: Mark extractOrgIdFromDsnHost and shouldContinueTrace as @internal
antonis e3bfa44
fix: Apply dart format with resolved dependencies
antonis 8e0acf7
fix: Hide internal functions from public API exports
antonis e3d200a
fix: Add direct dsn.dart import to sentry_options.dart
antonis 7806294
Merge remote-tracking branch 'origin/main' into feat/strict-trace-conโฆ
antonis c78ff38
chore: Move changelog entry to Unreleased section
antonis d2b12c7
Merge remote-tracking branch 'origin/main' into feat/strict-trace-conโฆ
antonis c15cb8f
feat(flutter): Pass strict trace continuation options to native Android
antonis 75f8ab2
fix(flutter): Use effectiveOrgId on native Android and bump size threโฆ
antonis 25b589e
style: Wrap long line for dart format
antonis 7d2e25c
fix: Propagate orgId in SentryTraceContextHeader.fromRecordingSpan
antonis a1d3441
fix: Tighten size threshold and ignore internal member warning
antonis 9c81fe0
style: Revert unrelated formatting changes in tracing_utils.dart
antonis 4afe986
style: Align internal exports with codebase convention
antonis 55d5089
feat: Harden org ID handling and auto-resolve options in fromSentryTrace
antonis 223b1b3
docs: Document fromSentryTrace validation and options fallback
antonis d80a407
Merge branch 'main' into feat/strict-trace-continuation
antonis 644dcd3
Merge branch 'main' into feat/strict-trace-continuation
antonis 02ef65b
Use safe method for org_id
antonis 168eb6f
Remove unneeded comments
antonis 48e3d72
Merge branch 'main' into feat/strict-trace-continuation
buenaflor e9f7fc8
Remove unneeded comments
antonis 65b1c56
Remove changelog
antonis 60de705
fix: Add missing import for getValueOrNull extension method
antonis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,4 +13,4 @@ startupTimeTest: | |
|
|
||
| binarySizeTest: | ||
| diffMin: 900 KiB | ||
| diffMax: 1300 KiB | ||
| diffMax: 1350 KiB | ||
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,6 +3,7 @@ import 'package:meta/meta.dart'; | |
| import '../sentry.dart'; | ||
| import 'protocol/access_aware_map.dart'; | ||
| import 'utils/sample_rate_format.dart'; | ||
| import 'utils/type_safe_map_access.dart'; | ||
|
|
||
| class SentryTraceContextHeader { | ||
| SentryTraceContextHeader( | ||
|
|
@@ -17,6 +18,7 @@ class SentryTraceContextHeader { | |
| this.sampled, | ||
| this.unknown, | ||
| this.replayId, | ||
| this.orgId, | ||
| }); | ||
|
|
||
| final SentryId traceId; | ||
|
|
@@ -35,6 +37,9 @@ class SentryTraceContextHeader { | |
| @internal | ||
| SentryId? replayId; | ||
|
|
||
| /// The organization ID associated with this trace. | ||
| final String? orgId; | ||
|
|
||
| /// Deserializes a [SentryTraceContextHeader] from JSON [Map]. | ||
| factory SentryTraceContextHeader.fromJson(Map<String, dynamic> data) { | ||
| final json = AccessAwareMap(data); | ||
|
|
@@ -49,6 +54,7 @@ class SentryTraceContextHeader { | |
| sampled: json['sampled'], | ||
| replayId: | ||
| json['replay_id'] == null ? null : SentryId.fromId(json['replay_id']), | ||
| orgId: json.getValueOrNull('org_id'), | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the import is missing because
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added with 60de705 |
||
| unknown: json.notAccessed(), | ||
| ); | ||
| } | ||
|
|
@@ -66,6 +72,7 @@ class SentryTraceContextHeader { | |
| if (sampleRate != null) 'sample_rate': sampleRate, | ||
| if (sampled != null) 'sampled': sampled, | ||
| if (replayId != null) 'replay_id': replayId.toString(), | ||
| if (orgId != null) 'org_id': orgId, | ||
| }; | ||
| } | ||
|
|
||
|
|
@@ -98,6 +105,9 @@ class SentryTraceContextHeader { | |
| if (replayId != null) { | ||
| baggage.setReplayId(replayId.toString()); | ||
| } | ||
| if (orgId != null) { | ||
| baggage.setOrgId(orgId!); | ||
| } | ||
| return baggage; | ||
| } | ||
|
|
||
|
|
@@ -109,6 +119,7 @@ class SentryTraceContextHeader { | |
| release: baggage.get('sentry-release'), | ||
| environment: baggage.get('sentry-environment'), | ||
| replayId: baggage.getReplayId(), | ||
| orgId: baggage.getOrgId(), | ||
|
antonis marked this conversation as resolved.
|
||
| ); | ||
| } | ||
|
|
||
|
|
@@ -134,6 +145,7 @@ class SentryTraceContextHeader { | |
| sampleRand: span.samplingDecision.sampleRand?.toString(), | ||
| sampled: span.samplingDecision.sampled.toString(), | ||
| replayId: replayId, | ||
| orgId: options.effectiveOrgId, | ||
| ); | ||
| } | ||
| } | ||
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes led to ~1345 KiB, exceeding the 1300 KiB threshold