Commit 23e43b7
authored
Improve Unity WebGL handling for stackless Unity log-callback exception reports. (#282)
* Add capture-mode enum for Unity exception log-handler
* Add fallback enum for optional WebGL JS stack capture
* Add BacktraceUnityLogCapture helper
Add helper for Unity log-callback diagnostics and stackless classification
* Add BacktraceUnityLogHandler wrapper
ILogHandler that intercepts Debug.LogException
* Add config fields for log handler capture and WebGL JS stack fallback
* Add BacktraceWebGLJavaScriptStack WebGL JS stack helper
* Add Addressables integration options
* Add optional Addressables integration
* Serialize custom report annotations
* Add AddAnnotation API and preserve source code on reports without frames
* Update SetThreadInformations to stop synthesizing faulting thread when no managed frames exist
* Update BacktraceSync.jslib
Add BT_CaptureJavaScriptStack jslib export for stack-at-capture
* Update BacktraceClient.cs
Capture original Debug.LogException
Classify stackless logs
Lock background queue
* Add tests for stackless log diagnostics and custom annotations
* Remove Addressables integration
* Add internal no-environment fallback
* Add internal CreateFromUnityLogCallback factory
* Update BacktraceReport.cs
Make AddAnnotation internal
Remove chaining
Add no-fallback factory
* Update Annotations.cs
Remove chaining in custom annotation overload
* Replace with stack source aware attribute/annotation helpers
* Create BacktraceUnityLogExceptionCandidate.cs
Add candidate model for original exception capture
* Create BacktraceUnityLogExceptionCandidateStore.cs
Add candidate store with prefix matching
* Create BacktraceUnityLogReportFactory.cs
Add factory that picks stack source per Unity log callback
* Record original exception only and remove direct send
* Update BacktraceClient.cs
Wire candidate store and report factory
Drop suppression queue
* Rewrite for stack-source attributes and no-fallback factory
* Create BacktraceUnityLogReportFactoryTests.cs
Add factory tests for stack-source
* add created classes metadata
* Update Tests
* Make log-handler and callback capture path dynamic
* Add callback capture path to candidate report builders
* Update SourceCodeFlowWithLogManagerTests.cs
Update source-code flow tests for stackless and frame bearing paths
* Update BacktraceUnityLogCapture.cs
Restrict candidate prefixes to type+message
Fall back to type only when empty
* Set backtrace.unity.stack_source on Unity-callback-only reports
* Update prefix tests for better matching and empty-message fallback
* Add regression test for same type & different message candidate mismatch
* Assert stack_source on Unity-callback only paths
* Update BacktraceClient.cs
Filter capture-path by prefix and fall back to log type
* Clear stale stackless reason when frames are recovered
Update Test case to assert reports with recovered frames drop stackless reason
* Keep original exception path when its stack is unparseable and Unity stack is empty
Update Test case to cover original exception unparsed-stack diagnostic
* Add candidate thread id to CreateOriginalExceptionAttributes
* Forward candidate thread id to original exception attributes
* Update BacktraceUnityLogCaptureTests.cs
Pass thread id to helper tests and assert it
* Update BacktraceUnityLogReportFactoryTests.cs
Add Test case for candidate thread id propagation for background-thread captures1 parent 83ba54c commit 23e43b7
34 files changed
Lines changed: 2240 additions & 117 deletions
File tree
- Runtime
- Model
- JsonData
- Types
- WebGL
- Tests
- Runtime
- SourceCode
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
235 | 253 | | |
236 | 254 | | |
237 | 255 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
179 | | - | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
180 | 186 | | |
181 | 187 | | |
182 | 188 | | |
| |||
191 | 197 | | |
192 | 198 | | |
193 | 199 | | |
194 | | - | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
195 | 204 | | |
196 | 205 | | |
197 | 206 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
84 | 95 | | |
85 | 96 | | |
86 | 97 | | |
| |||
91 | 102 | | |
92 | 103 | | |
93 | 104 | | |
94 | | - | |
95 | 105 | | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
96 | 110 | | |
97 | | - | |
98 | | - | |
99 | 111 | | |
100 | 112 | | |
101 | 113 | | |
| |||
124 | 136 | | |
125 | 137 | | |
126 | 138 | | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
127 | 177 | | |
128 | 178 | | |
129 | 179 | | |
| |||
149 | 199 | | |
150 | 200 | | |
151 | 201 | | |
152 | | - | |
| 202 | + | |
153 | 203 | | |
154 | 204 | | |
155 | 205 | | |
| |||
158 | 208 | | |
159 | 209 | | |
160 | 210 | | |
161 | | - | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
162 | 216 | | |
163 | 217 | | |
164 | 218 | | |
| |||
237 | 291 | | |
238 | 292 | | |
239 | 293 | | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
240 | 318 | | |
241 | 319 | | |
242 | 320 | | |
| |||
248 | 326 | | |
249 | 327 | | |
250 | 328 | | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
251 | 336 | | |
252 | 337 | | |
253 | 338 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | 17 | | |
| 18 | + | |
22 | 19 | | |
23 | 20 | | |
24 | 21 | | |
25 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
26 | 33 | | |
27 | 34 | | |
28 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
29 | 44 | | |
30 | 45 | | |
31 | | - | |
| 46 | + | |
32 | 47 | | |
33 | 48 | | |
34 | | - | |
| 49 | + | |
| 50 | + | |
35 | 51 | | |
36 | | - | |
37 | | - | |
| 52 | + | |
| 53 | + | |
38 | 54 | | |
39 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
40 | 59 | | |
41 | | - | |
42 | | - | |
43 | | - | |
| 60 | + | |
44 | 61 | | |
45 | | - | |
| 62 | + | |
46 | 63 | | |
47 | | - | |
| 64 | + | |
48 | 65 | | |
| 66 | + | |
| 67 | + | |
49 | 68 | | |
50 | | - | |
| 69 | + | |
| 70 | + | |
51 | 71 | | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 72 | + | |
57 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
58 | 78 | | |
59 | 79 | | |
60 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
61 | 83 | | |
62 | 84 | | |
63 | 85 | | |
64 | 86 | | |
65 | 87 | | |
66 | | - | |
| 88 | + | |
67 | 89 | | |
68 | 90 | | |
69 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
70 | 94 | | |
71 | 95 | | |
72 | 96 | | |
73 | 97 | | |
74 | | - | |
| 98 | + | |
| 99 | + | |
75 | 100 | | |
76 | 101 | | |
77 | 102 | | |
| |||
0 commit comments