-
-
Notifications
You must be signed in to change notification settings - Fork 9
Description
Our client doesn’t actually know what its release is immediately on start up, because we have a bootstrapping process. The first scene that loads is a bootstrapper scene, who goes out and discovers available patches that were deployed to our CDN. It downloads them and applies them. These patches can include changes to everything in the game. This is thanks to the dynamic nature of GDScript, we can ‘patch’ new code in this way without releasing a brand new client through the app store. The issue is, that means I cannot set the app’s release in the Sentry initialization script, I can only set it later.
I could set whatever it was last time the client started up (we cache this on disk), which would be better than nothing, but this will be inaccurate if they end up applying any patches afterward during the same session.
If I were able to delay the initialization of Sentry, I could make sure patching occurs first, and so I will know a valid release name. However, then if there are any errors during the bootstrap process, they would not be captured by Sentry. It's a bit of a chicken and egg problem, that maybe could be solved with a mechanism to capture but delay sending reports until the release is assigned.
Seems like the best option may be to allow me to change it post-initialization. I'd set the release to that last-known release in the configuration script, and then if they end up patching up afterward, I'd reassign it. This would mean any bootstrap related problems would be reported on the previous release, and events afterward on the current release. That is not far from the truth of what happened, so would be a reasonable solution I think, and wouldn't require any complex queueing mechanism.