Skip to content

Conversation

@bitsandfoxes
Copy link
Contributor

@bitsandfoxes bitsandfoxes commented Oct 29, 2025

Depends on getsentry/sentry-dotnet#4681
Resolves #2334

Problem

The UnityApplicationLoggingIntegration receives stringified stack traces from Unity for log messages. The SDK automatically captures Debug.LogError events when CaptureLogErrorEvents is enabled. Previously, when AttachStacktrace was enabled, the SDK created a synthetic UnityErrorLogException to attach the stack trace to these events, which would then be processed as a normal exception.

This approach caused several issues:

  • Incorrect event type: Debug.LogError messages appeared as exceptions on the Sentry dashboard, not as error messages
  • Misleading severity: Issues were sometimes marked as fatal when they were just error logs

Proposal

Debug.LogError events are now captured as message events with stack traces attached via the SentryThreads property, following the same pattern as the MainEventProcessor uses (see here) for regular messages with AttachStacktrace enabled.

Result

Screenshot 2025-10-30 at 18 09 18

Copy link
Contributor Author

@bitsandfoxes bitsandfoxes Oct 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are not new tests. The parsing was already tested in the UnityLogExceptionTests and now moved into the helper.

@bitsandfoxes bitsandfoxes marked this pull request as ready for review October 31, 2025 10:16
cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

cursor[bot]

This comment was marked as outdated.

@bitsandfoxes bitsandfoxes requested a review from a team November 3, 2025 12:28
@bitsandfoxes bitsandfoxes merged commit 1308c56 into feat/bump-version6 Nov 3, 2025
82 of 84 checks passed
@bitsandfoxes bitsandfoxes deleted the fix/debug-logerror branch November 3, 2025 14:24
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.

3 participants