elastic/kibana

[telemetry] fetcher.validateConnectivity should wait for core ES service

Open

#171888 opened on Nov 23, 2023

View on GitHub
 (1 comment) (1 reaction) (0 assignees)TypeScript (19,065 stars) (8,021 forks)batch import
Feature:TelemetryTeam:Coreenhancementgood first issue

Description

Initial discussion here: https://github.com/elastic/kibana/pull/171713#pullrequestreview-1743923611

I wonder if we'd like to leverage the ES core service status as well (prob before setting up the timer, or merged). This way, if Kibana starts when ES is not available, it doesn't need to wait 12H to trigger the next connectivity check.

The telemetry connection check

https://github.com/elastic/kibana/blob/0b91e6db9b5fadcf2146ae8c174d3a3b49383239/src/plugins/telemetry/server/fetcher.ts#L98-L113

requires to fetch the telemetry config SO from the SO index. Therefore, the observable chain should ideally depend on the core ES service's status to only fetch when ES is up (and to try as soon as ES is up)

Contributor guide