23fa1b4c07
* updated telemetry types * update tests * telemtery JSON file Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> |
||
---|---|---|
.. | ||
README.md | ||
xpack_monitoring.json | ||
xpack_plugins.json | ||
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 theoss_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 instack_stats.kibana.plugins
.
It is automatically generated by@kbn/telemetry-tools
based on theschema
property provided by all the registered Usage Collectors via theusageCollection.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 underproperties.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.