-
-
Notifications
You must be signed in to change notification settings - Fork 226
feat: Associate replays with errors and traces on Android #4133
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 29 commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
3ef1422
Associate replays with errors and traces on Android
jamescrosswell 9872376
Format code
getsentry-bot b8d9452
Set replay_id on DSC rather than directly on the event Context
jamescrosswell ae6157e
Update CHANGELOG.md
jamescrosswell 6f848a3
Verify NetFX
getsentry-bot 05c674c
Merge branch 'main' into replay-link-events
jamescrosswell cf534b9
Update CHANGELOG.md
jamescrosswell ff8019b
DSC tests
jamescrosswell 0989eca
Hub Tests
jamescrosswell b43f1bf
Update AndroidEventProcessor.cs
jamescrosswell f6a8242
Protocol tests
jamescrosswell 6386234
Fix verify tests
jamescrosswell 41ba57d
Update DynamicSamplingContextTests.cs
jamescrosswell 75997c6
Windows verify tests
getsentry-bot 32ba50b
Format code
getsentry-bot efb200d
Merge branch 'main' into replay-link-events
jamescrosswell 6d770cb
Ensure any replay_id in the PropagationContext is used when creating …
jamescrosswell 37b40c5
Prefer our session replay id over the propagated ones
jamescrosswell 356d39d
Converted static ReplayHelper to a Singleton (for cleaner testing)
jamescrosswell 66e3f80
Add replayId scenarios to SentryPropagationContextTests
jamescrosswell edc0b9c
Format code
getsentry-bot 81c4f50
Merge branch 'main' into replay-link-events
getsentry-bot b50ae47
Merge branch 'main' into replay-link-events
getsentry-bot 7b95524
Windows verify tests
getsentry-bot 330bd66
Merge branch 'replay-link-events' of https://github.com/getsentry/sen…
getsentry-bot 39e56fd
Update ReplaySession.cs
jamescrosswell 4f2f39c
Ensure trace or propagation context always gets applied to event
jamescrosswell 4c2fc76
Merge branch 'main' into replay-link-events
jamescrosswell 8ef8d66
Update CHANGELOG.md
jamescrosswell eee7a20
Merge branch 'main' into replay-link-events
jamescrosswell 4ce0049
Removed ReplaySession.DisabledInstance
jamescrosswell c3ab0b4
Review feedback
jamescrosswell cf96b60
Update CHANGELOG.md
jamescrosswell b989d5c
Merge branch 'main' into replay-link-events
jamescrosswell 54e5536
Update src/Sentry/DynamicSamplingContext.cs
jamescrosswell 0b21161
Merge branch 'main' into replay-link-events
jamescrosswell 369b529
Merge branch 'main' into replay-link-events
vaind 438c4e6
chore: fixup changelog merge changes
vaind 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
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
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 |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| #if __ANDROID__ | ||
| using Sentry.Android.Extensions; | ||
| #endif | ||
|
|
||
| namespace Sentry.Internal; | ||
|
|
||
| internal interface IReplaySession | ||
Flash0ver marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| { | ||
| public SentryId? ActiveReplayId { get; } | ||
| } | ||
|
|
||
| internal class ReplaySession : IReplaySession | ||
| { | ||
| public static readonly IReplaySession Instance = new ReplaySession(); | ||
|
|
||
| internal static readonly IReplaySession DisabledInstance = new DisabledReplaySession(); | ||
|
|
||
| private ReplaySession() | ||
| { | ||
| } | ||
|
|
||
| public SentryId? ActiveReplayId | ||
| { | ||
| get | ||
| { | ||
| #if __ANDROID__ | ||
| // Check to see if a Replay ID is available | ||
| var replayId = JavaSdk.ScopesAdapter.Instance?.Options?.ReplayController?.ReplayId?.ToSentryId(); | ||
| return (replayId is { } id && id != SentryId.Empty) ? id : null; | ||
| #else | ||
| return null; | ||
|
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. Is the idea to add iOS here later? potentially Web for example if we were brave enough? 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. Yeah, I was planning for at least iOS... |
||
| #endif | ||
| } | ||
| } | ||
|
|
||
| private class DisabledReplaySession : IReplaySession | ||
| { | ||
| public SentryId? ActiveReplayId => null; | ||
| } | ||
| } | ||
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.