kibana/x-pack/plugins/telemetry_collection_xpack/schema
Alejandro Fernández Haro f44916b6aa
[Telemetry] Full schema definition (#90273)
Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-03-01 18:30:51 +00:00
..
README.md [Telemetry] Full schema definition (#90273) 2021-03-01 18:30:51 +00:00
xpack_plugins.json [Telemetry] Full schema definition (#90273) 2021-03-01 18:30:51 +00:00
xpack_root.json [Telemetry] Full schema definition (#90273) 2021-03-01 18:30:51 +00:00

X-Pack Telemetry Schemas

This is an extension of the OSS Telemetry Schemas to add the X-Pack-related data. The payloads described in these .json files must be merged to the OSS ones to get the structure of the full payload sent to the Remote Telemetry Service. All the files follow the schema convention as defined in the usage_collection plugin and @kbn/telemetry-tools.

There are currently 2 files:

  • xpack_root.json: Defines the extra fields x-pack reports over the OSS payload defined in the oss_root.json.
    Manually maintained for now because the frequency it changes is expected to be pretty low.
  • xpack_plugins.json: The X-Pack related schema for the content that will be nested in stack_stats.kibana.plugins.
    It is automatically generated by @kbn/telemetry-tools based on the schema property provided by all the registered Usage Collectors via the usageCollection.makeUsageCollector API.
    More details in the Schema field chapter in the UsageCollection's docs.

NOTE: Despite its similarities to ES mappings, the intention of these files is not to define any index mappings. They should be considered as a tool to understand the format of the payload that will be sent when reporting telemetry to the Remote Service.

Testing

Functional tests are defined at x-pack/test/api_integration/apis/telemetry/telemetry_local.ts. They merge both files (+ the OSS definitions), and validates the actual output of the telemetry endpoint against the final schema.