-
-
Notifications
You must be signed in to change notification settings - Fork 276
Feat: Sync Scope to Native #858
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
53 commits
Select commit
Hold shift + click to select a range
36a151e
sync setuser to android
026a30f
set user on swift plugin
c0ea8f6
set extras
dfbefc4
add breadcrumb on andorid
83e28b5
add breadcrumb on cocoa
48ff46b
call add breadcrumb on scope
06d9393
clear breadcrumbs and set extra
7c8ff6c
support set tag
5001487
make method private
976810d
add remove extra and remove tag methods
6e2485e
remove extra & tag in plugins
5fee5ec
add set/remove setContexts
9f3ae5e
set/remove contexts
08849d9
Use statically exposed methods
2ad6e8b
call statically exposed methods on cocoa
80efc40
call toString instead of string cast
a84ed5a
remove redundant return types
c70c62e
Change return type to future
8eaee05
fix tests
667b818
add tests for native channel
073d25f
add senty native tests
959c888
test scope
082d195
revert last upgrade check
f59a05e
fix conflict
marandaneto 9c685d4
prefer single imports
186f60e
provide old getter with deprecation annotation
e4e5721
Merge branch 'feat/sync-scope-to-native' of github.com:getsentry/sent…
300b177
Change FutureOr<void> to Future<void> return types.
418aa05
import single files
9c74a7d
remove unn semicolons
8ae857c
remove todos referencing scope sync
3b8cd9a
remove breadcrumbs if handled
ebf5633
revert xcode u version
fac7026
add missing import
708c13c
fix compile error in example
c0175dc
Add changelog entry
c29a4b4
run format
acde3fd
Merge branch 'main' into feat/sync-scope-to-native
b670762
Merge branch 'main' into feat/sync-scope-to-native
denrase 557ae60
reduce nested depth
denrase 757db8d
return attachments
denrase d29aa0b
await removeObservers
denrase 69b05f9
await in clear
denrase 73f1117
Merge branch 'main' into feat/sync-scope-to-native
denrase ab12d62
recreate baseline
denrase f12b240
add comment ho to recreate baseline
denrase fea9fd3
addd -cb param to recreate baseline in comment
denrase 9cb6891
only run detekt in folders containing android code
denrase 6198557
await clear in tests
denrase 631eaaf
align case
denrase bee4089
disable swiftlint rules
denrase 4236b3e
use shorthand syntactic sugar
denrase de28717
Merge branch 'main' into feat/sync-scope-to-native
marandaneto 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -40,14 +40,14 @@ Future<void> runApp() async { | |
| ); | ||
|
|
||
| Sentry.configureScope((scope) { | ||
| scope.setUser(SentryUser( | ||
| id: '800', | ||
| username: 'first-user', | ||
| email: '[email protected]', | ||
| // ipAddress: '127.0.0.1', sendDefaultPii feature is enabled | ||
| extras: <String, String>{'first-sign-in': '2020-01-01'}, | ||
| )); | ||
| scope | ||
| ..user = SentryUser( | ||
| id: '800', | ||
| username: 'first-user', | ||
| email: '[email protected]', | ||
| // ipAddress: '127.0.0.1', sendDefaultPii feature is enabled | ||
| extras: <String, String>{'first-sign-in': '2020-01-01'}, | ||
| ) | ||
| // ..fingerprint = ['example-dart'], fingerprint forces events to group together | ||
| ..transaction = '/example/app' | ||
| ..level = SentryLevel.warning | ||
|
|
||
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 |
|---|---|---|
|
|
@@ -40,18 +40,21 @@ void runApp() { | |
|
|
||
| Sentry.configureScope((scope) { | ||
| scope | ||
| ..user = SentryUser( | ||
| id: '800', | ||
| username: 'first-user', | ||
| email: '[email protected]', | ||
| // ipAddress: '127.0.0.1', | ||
| extras: <String, String>{'first-sign-in': '2020-01-01'}, | ||
| ) | ||
| // ..fingerprint = ['example-dart'] | ||
| ..transaction = '/example/app' | ||
| ..level = SentryLevel.warning | ||
| ..setTag('build', '579') | ||
| ..setExtra('company-name', 'Dart Inc'); | ||
|
|
||
| scope.setUser( | ||
| SentryUser( | ||
| id: '800', | ||
| username: 'first-user', | ||
| email: '[email protected]', | ||
| // ipAddress: '127.0.0.1', | ||
| extras: <String, String>{'first-sign-in': '2020-01-01'}, | ||
| ), | ||
| ); | ||
| }); | ||
|
|
||
| querySelector('#btEvent') | ||
|
|
||
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,16 @@ | ||
| import 'dart:async'; | ||
|
|
||
| import 'protocol/breadcrumb.dart'; | ||
| import 'protocol/sentry_user.dart'; | ||
|
|
||
| abstract class ScopeObserver { | ||
denrase marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| Future<void> setContexts(String key, dynamic value); | ||
| Future<void> removeContexts(String key); | ||
| Future<void> setUser(SentryUser? user); | ||
| Future<void> addBreadcrumb(Breadcrumb breadcrumb); | ||
| Future<void> clearBreadcrumbs(); | ||
| Future<void> setExtra(String key, dynamic value); | ||
| Future<void> removeExtra(String key); | ||
| Future<void> setTag(String key, String value); | ||
| Future<void> removeTag(String key); | ||
| } | ||
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.
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.