fix: Do not delete the app state#2382
Conversation
The app state is needed on the next app start, to be copied to previous app state. This is needed to determine the app start type. Closes 2376
Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 5025d2e | 1248.52 ms | 1251.72 ms | 3.20 ms |
| 0fdf0b2 | 1245.88 ms | 1247.69 ms | 1.82 ms |
| b15627c | 1256.48 ms | 1264.68 ms | 8.20 ms |
| 604586a | 1216.06 ms | 1249.10 ms | 33.04 ms |
| db5f62a | 1234.47 ms | 1257.80 ms | 23.33 ms |
| 4e037c4 | 1205.00 ms | 1227.58 ms | 22.58 ms |
| 8607e67 | 1255.80 ms | 1259.50 ms | 3.70 ms |
| 46deabf | 1217.73 ms | 1247.30 ms | 29.57 ms |
| 0032a5d | 1267.35 ms | 1282.34 ms | 14.99 ms |
| 725723e | 1228.47 ms | 1255.09 ms | 26.62 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 5025d2e | 20.51 KiB | 331.79 KiB | 311.28 KiB |
| 0fdf0b2 | 20.51 KiB | 332.90 KiB | 312.39 KiB |
| b15627c | 20.50 KiB | 337.76 KiB | 317.25 KiB |
| 604586a | 20.51 KiB | 333.15 KiB | 312.65 KiB |
| db5f62a | 20.51 KiB | 333.16 KiB | 312.65 KiB |
| 4e037c4 | 20.50 KiB | 361.80 KiB | 341.29 KiB |
| 8607e67 | 20.50 KiB | 338.99 KiB | 318.49 KiB |
| 46deabf | 20.75 KiB | 374.16 KiB | 353.41 KiB |
| 0032a5d | 20.75 KiB | 369.27 KiB | 348.52 KiB |
| 725723e | 20.75 KiB | 367.21 KiB | 346.46 KiB |
Previous results on branch: fix/2376-do-not-delete-app-state
Startup times
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 07f37e5 | 1228.33 ms | 1259.07 ms | 30.74 ms |
| bba6cd3 | 1243.64 ms | 1258.44 ms | 14.80 ms |
| 6f9637d | 1265.12 ms | 1281.86 ms | 16.73 ms |
| b6d2fb0 | 1201.00 ms | 1236.82 ms | 35.82 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 07f37e5 | 20.75 KiB | 374.15 KiB | 353.39 KiB |
| bba6cd3 | 20.75 KiB | 374.19 KiB | 353.44 KiB |
| 6f9637d | 20.75 KiB | 373.64 KiB | 352.89 KiB |
| b6d2fb0 | 20.75 KiB | 373.64 KiB | 352.89 KiB |
|
Please also see my question here about removing the call to |
philipphofmann
left a comment
There was a problem hiding this comment.
Please add an integration test to reproduce the issue in #2376 and prove that is fixed now.
| ### Fixes | ||
|
|
||
| - Too long flush duration (#2370) | ||
| - Do not delete the app state when OOM tracking is disabled (#2382) |
There was a problem hiding this comment.
m: Please change this, so we describe what we are fixing instead of how. I think we fixed a bug that we always report cold starts when OOM is enabled.
| assertValidHybridStart(type: .warm) | ||
| } | ||
|
|
||
| private func givenPreviousAppState(appState: SentryAppState) { |
There was a problem hiding this comment.
As this is not the previous but the current app state, this name really didn't make sense.
Instructions and example for changelogPlease add an entry to Example: ## Unreleased
- Do not delete the app state ([#2382](https://github.com/getsentry/sentry-cocoa/pull/2382))If none of the above apply, you can opt out of this check by adding |
|
Why is it so often complaining about a missing changelog when it's definitely there. |
…ents * master: build(deps): bump github/codeql-action from 2.1.31 to 2.1.32 (#2386) build(deps): bump fastlane from 2.210.1 to 2.211.0 (#2385) ref: json serialization error reporting (#2355) release: 7.31.0 ref: Fix outdated comment in SessionTracker (#2381) fix: Do not delete the app state (#2382) build: Split Swift and Clang format for pre-commit (#2380)
📜 Description
The app state is needed on the next app start, to be copied to previous app state. This is needed to determine the app start type. We should never delete the app state.
💡 Motivation and Context
Closes #2376
💚 How did you test it?
Unit tests
📝 Checklist
🔮 Next steps