Skip to content

Conversation

@jayhf
Copy link
Contributor

@jayhf jayhf commented Nov 22, 2024

The command line arguments seem like a really useful piece of information to have when debugging crashes. This adds them to the DefaultContext so that they're readily available in Sentry

@jayhf jayhf requested a review from tustanivsky as a code owner November 22, 2024 17:11
@tustanivsky
Copy link
Collaborator

Hey @jayhf, I believe we're already adding the command line input to Crash Info context on Win/Linux for captured crash events:

ContextValues.Add("Command Line", FString(SessionContext.CommandLine).TrimStart());

Does it miss some bits of info you expect to be there along with other CL arguments?

@jayhf
Copy link
Contributor Author

jayhf commented Nov 26, 2024

Ah, that's great to know. I didn't realize. Where exactly can those context be found? I haven't seen any of those fields in the crash logs I'm analyzing. Are there any docs you'd recommend for what information is available where?

@tustanivsky
Copy link
Collaborator

The command line arguments can be found at captured crash event's page in Contexts -> Crash Info section in case you're using Sentry's plugin integration for error handling:

image

If you're sending crashes to Sentry with the default Crash Reporter instead then CL args should be listed in Contexts -> unreal -> custom.

Also, you can consider enriching the events with custom contexts via the plugin's API if the default one misses some bits of info you're interested in.

@jayhf
Copy link
Contributor Author

jayhf commented Dec 16, 2024

Sorry for the slow response here. I think I've figured out why I wasn't seeing the information before: Most of the issues I'm encountering are assertion failures, which ultimately result in the process exiting, but aren't treated as crashes by the Sentry plugin. Interestingly, even the crash context records IsAssert, so this seems to be due to a bug or limitation of Sentry's plugin. Perhaps it's even a Linux specific issue. These two issues might be related: #381 and #496, but neither seems like exactly the issue I'm hitting. At any rate, this clearly isn't the right approach so I'll close the PR and I may follow up with an issue later.

@jayhf jayhf closed this Dec 16, 2024
@jayhf jayhf deleted the patch-1 branch December 16, 2024 20:32
@tustanivsky
Copy link
Collaborator

@jayhf Thank you for following up. Previously, we had to modify the engine's default assertion-capturing flow to resolve an issue with event grouping in Sentry. However, we are now exploring an alternative approach (#669) that should allow us to restore the original implementation.

@jayhf
Copy link
Contributor Author

jayhf commented Dec 17, 2024

Makes sense. I'll keep an eye on that issue, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants