-
-
Notifications
You must be signed in to change notification settings - Fork 41
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
Fix automatic game log attachment (Android) #309
Conversation
if(!gameLogPath.isEmpty()) { | ||
scope.addAttachment(new Attachment(gameLogPath)); | ||
} | ||
options.setBeforeSend(new SentryOptions.BeforeSendCallback() { |
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.
I'm not entirely sure how that works underneath but can that callback be overwritten by users?
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.
We don't expose any APIs allowing users to do that, so it should be safe to set the beforeSend
hook like this.
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.
Considering that we want to expose that API in the future, we could add this as an event-processor/integration instead?
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.
Yeah, I think it should be feasible.
options.setBeforeSend(new SentryOptions.BeforeSendCallback() { | ||
@Override | ||
public SentryEvent execute(SentryEvent event, Hint hint) { | ||
if(event.isCrashed() && event.isErrored()) |
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.
Doesn't that mean that if the app crashed in the run before the gamelogs from the current run won't be part of any current events?
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.
No, after sending the crash event on app startup all subsequent events should be treated as usual with a current session's game log attached.
Instructions and example for changelogPlease add an entry to Example: ## Unreleased
- Fix automatic game log attachment (Android) ([#309](https://github.com/getsentry/sentry-unreal/pull/309)) If none of the above apply, you can opt out of this check by adding |
Related to #302