[Telemetry] Synchronous setup and start methods#79457
Conversation
|
Pinging @elastic/kibana-telemetry (Team:KibanaTelemetry) |
| this.savedObjectsClient = savedObjects.createInternalRepository(); | ||
| const savedObjectsClient = new SavedObjectsClient(this.savedObjectsClient); | ||
| this.uiSettingsClient = uiSettings.asScopedToClient(savedObjectsClient); | ||
| this.elasticsearchClient = elasticsearch.client; |
There was a problem hiding this comment.
-
I am slightly worried about any side affects that might result from not awaiting
handleOldSettings. Telemetry might be enabled/disabled inside this function yet if we are not awaiting it other functions might not pick up the right value. What do you think? -
Can we move all the above (
savedObjectsClientanduiSettingsClientfrom line 136) to thehandleOldSettingsfunction? Since it is an async function these sync methods will not block the main thread when called.
There was a problem hiding this comment.
Yeah! Makes sense! I think we had all the private clients because we used to instantiate the collectors in this plugin. But now they live in kibana_usage_collection, so it makes sense to only use them where appropriate.
I'll push an update in a sec!
💚 Build SucceededMetrics [docs]
History
To update your PR or re-run it, just comment with: |
Bamieh
left a comment
There was a problem hiding this comment.
Awesome, I love this solution.
# Conflicts: # src/plugins/telemetry/server/plugin.ts
…into feature/task_manager_429 * 'feature/task_manager_429' of github.com:elastic/kibana: (158 commits) Add license check to direct package upload handler. (#79653) [Ingest Manager] Rename API /api/ingest_manager => /api/fleet (#79193) [Security Solution][Resolver] Simplify CopyableField styling and add comments (#79594) Fine-tunes ML related text on Metrics UI (#79425) [ML] DF Analytics creation wizard: ensure job creation possible when model memory lower than estimate (#79229) Add new "Add Data" tutorials (#77237) Update APM telemetry docs (#79583) Revert "Add support for runtime field types to mappings editor. (#77420)" (#79611) Kibana request headers (#79218) ensure missing indexPattern error is bubbled up to error callout (#79378) Missing space fix (#79585) remove duplicate tab states (#79501) [data.ui] Lazy load UI components in data plugin. (#78889) Add generic type params to search dependency. (#79608) [Ingest Manager] Internal action for policy reassign (#78493) [ILM] Add index_codec to forcemerge action in hot and warm phases (#78175) [Ingest Manager] Update open API spec and add condition to agent upgrade endpoint (#79579) [ML] Hide Data Grid column options when histogram charts are enabled. (#79459) [Telemetry] Synchronous `setup` and `start` methods (#79457) [Observability] Persist time range across apps (#79258) ...
|
Pinging @elastic/kibana-core (Team:Core) |
Summary
Remove the
asynccondition of thesetupandstartmethods in thetelemetryplugin.Resolves #79452.
For maintainers