elastic/kibana

[Telemetry] Better error handling at the `telemetry_plugin_collector`

Open

#122.634 geöffnet am 11. Jan. 2022

Auf GitHub ansehen
 (4 Kommentare) (1 Reaktion) (0 zugewiesene Personen)TypeScript (8.021 Forks)batch import
Feature:TelemetryTeam:Coregood first issueimpact:lowloe:small

Repository-Metriken

Stars
 (19.065 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 1T 16h) (999 gemergte PRs in 30 T)

Beschreibung

In the telemetry_plugin_collector we are swallowing any errors thrown by getTelemetrySavedObject: https://github.com/elastic/kibana/blob/c2641bd8cc875dd50c63a40fbaf3054780cd570b/src/plugins/telemetry/server/collectors/telemetry_plugin/telemetry_plugin_collector.ts#L45-L52

I don't think that we should do this as we might report different data depending on whether there's an ES connection issue or not (because when there's no savedObject information we rely on the kibana.yml config values).

IMO, we should either let the collector fail or populate the related fields only when getTelemetrySavedObject succeeds.

Contributor Guide