-
-
Notifications
You must be signed in to change notification settings - Fork 451
Add device and OS attributes to logs #4493
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
Changes from all commits
0cc3de4
5a42ee3
57e7d5c
5900c4e
a286c0c
225e4a8
23fe9f7
76ac22b
72b09b1
f1afe92
c234a3d
57d679f
4128f36
42ae4c2
f29c3ca
299663c
1419268
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,6 +45,17 @@ default SentryReplayEvent process(@NotNull SentryReplayEvent event, @NotNull Hin | |
return event; | ||
} | ||
|
||
/** | ||
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. An alternative to going through We could also offer hooks but I didn't want to hack that in, so I went this route and we can transform it into a better hook API in the future. |
||
* May mutate or drop a SentryLogEvent | ||
* | ||
* @param event the SentryLogEvent | ||
* @return the event itself, a mutated SentryLogEvent or null | ||
*/ | ||
@Nullable | ||
default SentryLogEvent process(@NotNull SentryLogEvent event) { | ||
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. Decided not to add 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. Can we also add an empty override to |
||
return event; | ||
} | ||
|
||
/** | ||
* Controls when this EventProcessor is invoked. | ||
* | ||
|
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.
so I'm thinking querying DeviceInfoUtil is probably too much work for this, shall we maybe just directly use the const values for brand, model and family from
android.os.Build
? Same for the OS name and version, those are also const values. Just trying to minimize impact since logs can happen frequent and originate from the main thread.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.
Updated, introduced a
LazyEvaluator
so we don't run a regex for the family on each log emitted.