If the collection side is facing issues with gathering the Beat stats for the APM/Integration server then the two calls made here to fetch the stats and the timestamp of the latest ingestion both turn up undefined (so {} is returned thanks to io-ts stripping away any undefined keys).
This results in this code here to throw since config is undefined (even if it's available in the global plugin config).
We could simply guard that with an optional chaining access or read from the plugin config in the browser, but I feel like it would make more sense to expose that this data is missing to the user since it likely indicates an error in the collection side.
AC
When Beat stats are missing, the UI doesn't throw in the APM/Integration server instance page
(Stretch) Information about the missing data is shown to the user so they can investigate
If the collection side is facing issues with gathering the Beat stats for the APM/Integration server then the two calls made here to fetch the stats and the timestamp of the latest ingestion both turn up undefined (so
{}
is returned thanks toio-ts
stripping away anyundefined
keys).This results in this code here to throw since
config
isundefined
(even if it's available in the global plugin config).We could simply guard that with an optional chaining access or read from the plugin config in the browser, but I feel like it would make more sense to expose that this data is missing to the user since it likely indicates an error in the collection side.
AC