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] [schema] Define schema for the data that is reported by the telemetry plugin #83704

Closed
3 of 5 tasks
afharo opened this issue Nov 18, 2020 · 7 comments · Fixed by #90273
Closed
3 of 5 tasks
Assignees
Labels
Feature:Telemetry Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc

Comments

@afharo
Copy link
Member

afharo commented Nov 18, 2020

We currently have a way to define the schema that is returned by the Usage Collectors.

They usually end up under stack_stats.kibana.plugins.[]. But we need to find a way to define and keep up to date the structure of the data that we return for every other fields (other stack_stats.[PRODUCT], and the stack_stats.kibana and root keys like version, cluster_stats, etc.).

This way we can have a contract with the remote telemetry service for all the fields that we send.

Items to cover:

  • Define "static" definition of the schema
  • Add functional tests that validate the payload against the schema to be aware of breaking changes in ES APIs (split definition between OSS and X-Pack)
  • Check original issue where ES defines their contracts (Add aggregation list to node info elasticsearch#60074)
  • ML specific use case: speak ES-ML devs to know how to best test this.
  • Maybe train the devs that constantly change the contract? Include it in the wiki? Emails?

N.B.: Elasticsearch will eventually provide an API for telemetry purposes (elastic/elasticsearch#58198). But it's not happening anytime soon.

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-telemetry (Team:KibanaTelemetry)

@TinaHeiligers TinaHeiligers added this to the Developer Experience milestone Nov 19, 2020
@TinaHeiligers
Copy link
Contributor

Additional tasks required to support this:

  • Update the telemetry-tools
  • Update the schema-to-mapping tools in the telemetry repo

Note: nodes/usage fields will need to be mostly dynamic. We might also need to get non-kibana teams to supply the schemas somehow.

@Bamieh
Copy link
Member

Bamieh commented Dec 1, 2020

I suggest that we keep away from complicating the tools we have to support the "static" part of the data we report. I think adding a static file for the remainder of the reported fields in the telemetry repo should be more than enough. I dont recall any changes to those fields since the past 2 years or so.

@afharo
Copy link
Member Author

afharo commented Dec 2, 2020

Makes sense! +1 on creating static schemas for that.

I'd add on top some sort of validation based on the schema we define in the API's functional tests to make sure we are compliant over time. How does that sound?

@joshdover
Copy link
Contributor

+1 to including functional tests in the scope of this task

@afharo afharo added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc and removed Team:KibanaTelemetry labels Dec 10, 2020
@elasticmachine
Copy link
Contributor

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

@afharo
Copy link
Member Author

afharo commented Dec 15, 2020

Updated the description with the agreed items to cover to in this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

5 participants