kibana/x-pack/plugins/telemetry_collection_xpack/schema
Jean-Louis Leysens 23fa1b4c07
[Reporting] Updated telemetry types for V2 export types (#110622)
* updated telemetry types

* update tests

* telemtery JSON file

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
2021-09-03 11:30:51 +02:00
..
README.md
xpack_monitoring.json
xpack_plugins.json [Reporting] Updated telemetry types for V2 export types (#110622) 2021-09-03 11:30:51 +02:00
xpack_root.json

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.
  • xpack_monitoring.json: It declares the payload sent by the monitoring-sourced telemetry. The actual schema for the payload is declared under properties.monitoringTelemetry.properties.stats.items, but due to the general behaviour in the @kbn/telemetry-tools, it gets nested down in that path.

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.