Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[telemetry] Clean up cloud provider usage collector & add retry logic. #96711

Closed
lukeelmers opened this issue Apr 9, 2021 · 1 comment · Fixed by #110439
Closed

[telemetry] Clean up cloud provider usage collector & add retry logic. #96711

lukeelmers opened this issue Apr 9, 2021 · 1 comment · Fixed by #110439
Assignees
Labels
enhancement New value added to drive a business result Feature:Telemetry Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc

Comments

@lukeelmers
Copy link
Member

In #95131, we migrated some legacy "cloud detector" logic from the monitoring plugin into kibana_usage_collection in order to collect some basic information about what cloud environment Kibana is running in via a new cloud_provider usage collector. (src/plugins/kibana_usage_collection/server/collectors/cloud)

In reviewing the old code, we identified a few enhancements & cleanup tasks we'd like to address, some of which we didn't do at the time as it would have required some more heavy refactoring:

  1. getting rid of the constructor args which are only there for testing purposes (request, fs), and mocking those in the tests
  2. getting rid of the use of the request lib in favor of something like node-fetch which we use more widely in kibana (request looks like it's mostly used in tests atm, not many other places)
  3. adding some retry logic to the detector in the event of a retryable failure[0]
  4. updating GCP logic to still return values even if a request for one of the fields fails, instead of using an all-or-nothing approach

[0] Some of the API docs have info on possible error codes that can be returned, which we should take a look at when determining our retry logic:
https://docs.microsoft.com/en-us/azure/virtual-machines/windows/instance-metadata-service
https://cloud.google.com/compute/docs/storing-retrieving-metadata
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instancedata-data-retrieval.html

@lukeelmers lukeelmers added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc enhancement New value added to drive a business result Feature:Telemetry labels Apr 9, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Telemetry Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants