-
-
Notifications
You must be signed in to change notification settings - Fork 677
Description
When an error happens only on certain versions of the Zulip server, that can be a powerful clue for diagnosing it. I've often noticed when looking at Sentry events that I'd like to have that information. #3732 is a recent example that brought this to mind.
In implementing this, one layer is to use the Sentry API to get that information attached. I'm not sure how best to do that; @ray-kraesig has studied those docs recently and may have ideas.
The other layer is to get and keep the server-version information around in the first place. The server reports its version number in the server_settings
response, but we don't currently store it anywhere; the only things we use the server_settings
response for are at initial login, so we fetch it once then. It wouldn't do to just store it then, either, because of course the version (and other parts of that response) can change over the months and years the user might stay logged in.
Here's a plausible approach:
- Add a property like
serverVersion
to theAccount
type, found in theaccounts
state-subtree. Can benull | string
. - In the login flow, save the version we get.
- At the same time we call
/register
akaregisterForEvents
, indoInitialFetch
infetchActions.js
, make a/server_settings
request again and save the new version value.
The server version number could also be useful if we decide to condition on it for certain API changes, as suggested at #3732 (comment) .