fix: default PostExceptionsInEditor to false - #202
Open
bobbyg603 wants to merge 1 commit into
Open
Conversation
PostExceptionsInEditor defaulted to true in BugSplatOptions and in both client settings repositories, so every play mode NullReferenceException a developer hit while iterating was uploaded to the same database that collects reports from shipped players. Crash counts, and anything built on top of them, mixed developer noise with production signal, and a customer only stopped it by noticing the setting. Default it to false everywhere. Posting from the editor is now opt in, and the one case that wants it - verifying an integration - is a deliberate act one checkbox away. The alternative offered in #153, auto tagging editor reports with a filterable attribute, still uploads and stores every play mode exception and leaves the customer filtering noise they never asked for. The options asset and both settings repositories move together so a code constructed BugSplat and one built from an options asset agree. Options assets that already exist keep the value they serialized, so only newly created assets and code constructed clients see the new default; the my-unity-crasher sample asset already stores true and keeps working. Guard service tests that leaned on the old default now set the flag explicitly - they run in the editor, where the guard otherwise short circuits before ShouldPostException is consulted. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR changes the default behavior of BugSplatOptions.PostExceptionsInEditor (and the corresponding client-settings repositories) so editor/play mode exceptions are not uploaded by default, preventing developer iteration crashes from polluting production crash metrics.
Changes:
- Default
PostExceptionsInEditortofalseinBugSplatOptions(newly created options assets) and in both client settings repositories (code-constructed clients). - Update/extend runtime tests to pin the new defaults and keep mapping coverage in
CreateFromOptions. - Update README documentation to reflect the new default and how to enable editor exception posting when desired.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| Tests/Runtime/Reporter/ReportUploadGuardServiceTests.cs | Updates tests to explicitly enable editor posting where required for guard behavior under Application.isEditor. |
| Tests/Runtime/BugSplatCreateFromOptionsTests.cs | Adds/adjusts tests to pin default false and verify CreateFromOptions mapping for PostExceptionsInEditor. |
| Runtime/Settings/WebGLClientSettingsRepository.cs | Changes repository default PostExceptionsInEditor to false for code-constructed settings. |
| Runtime/Settings/DotNetStandardClientSettingsRepository.cs | Changes repository default PostExceptionsInEditor to false for code-constructed settings. |
| Runtime/Client/BugSplatOptions.cs | Removes = true initializer so newly created options assets default to false, and updates tooltip. |
| README.md | Documents the new default and instructions to enable editor exception uploading during integration verification. |
馃挕 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
daveplunkett
approved these changes
Aug 12, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #153
BugSplatOptions.PostExceptionsInEditordefaulted totrue, and so did both client settings repositories. Every play mode NullReferenceException a developer hit while iterating was uploaded to the same database that collects reports from shipped players, so crash counts - and anything built on top of them - mixed developer noise with production signal.Which option, and why
Issue #153 offers two fixes: default to
false, or keep posting and auto-tag editor reports with a filterable attribute. This PR defaults tofalse. The tag approach still uploads and stores every play mode exception: the customer pays for the storage, the reports still count against their data, and every dashboard, saved search, and alert has to learn to exclude the tag. Defaulting off costs the one audience that wants editor reports - somebody verifying their integration - a single checkbox, and that person is already in the inspector.What changed
Runtime/Client/BugSplatOptions.cs-PostExceptionsInEditorno longer initializes totrueRuntime/Settings/DotNetStandardClientSettingsRepository.csandRuntime/Settings/WebGLClientSettingsRepository.cs- defaultfalse, so a code-constructedBugSplatand one built from an options asset agreeOnly
PostExceptionsInEditoris touched, so this stays mergeable alongside #154, which is fixing the same class of disagreement forCapturePlayerLog.Breaking change
Editor exceptions are no longer uploaded unless the setting is enabled. This is a deliberate behavior change for 5.0.0.
PostExceptionsInEditor: 1stays1), so only newly created assets pick up the new default. Themy-unity-crashersample asset already stores1and keeps working unchanged.BugSplatconstructed in code -new BugSplat(...)orBugSplat.CreateFromOptionswith the field left alone - now skips editor exceptions. Anyone relying on editor reports setsbugsplat.PostExceptionsInEditor = trueor checks the box on the options asset.Tests
CreateFromOptions_ShouldCopyEveryConfiguredValuenow setsPostExceptionsInEditor = true, keeping every value in that test away from its default so the assertion still proves the mapping existsCreateFromOptions_WhenPostExceptionsInEditorNotSet_ShouldNotPostExceptionsInEditorpins the options asset defaultNewBugSplat_ShouldNotPostExceptionsInEditorpins the code-constructed default, so the two paths can't drift apart againReportUploadGuardServiceTestscases that relied on the old default now set the flag explicitly. They run in the editor, where the guard otherwise short-circuits beforeShouldPostExceptionis consulted; two of them (...ShouldPostExceptionTrue_ShouldReturnTrue,ShouldPostLogMessage_WhenLogTypeException_ShouldReturnTrue) would have failed outright, and the rest would have passed for the wrong reasonDocs
README's options table now states the default, and the Configuration section tells you how to turn editor posting on while verifying an integration.
Verification
Runtime/**plusTests/Runtime/**compile clean against Unity 6000.5.6f1 assemblies via a standalonedotnet build(Build succeeded, 0 errors; the 2 warnings are pre-existingCS0649s inBugSplat.cs). The Unity test runner was not executed - no Unity editor run was possible in this environment - so the new and edited tests are verified to compile but have not been run.馃 Generated with Claude Code