[APM] ADD logic to capture telemetry for metricset with and without rollups (#166598)

## Summary

Resolves 
1. https://github.com/elastic/kibana/issues/161981
2. https://github.com/elastic/kibana/issues/161984
3. It also adds the same statistics for last day

## How to test

A deployment has been prepared using the Chrome Extension. (It uses Obs
Environment, so data is present)

Please go to this end point to see a similar payload in screenshot

>
https://achyutjhunjhunwala-d-pr166598.kb.us-west2.gcp.elastic-cloud.com/internal/apm/debug-telemetry

<img width="667" alt="image"
src="811b0394-02f1-4edc-aec0-4bb6a3cd14ae">
This commit is contained in:
Achyut Jhunjhunwala 2023-09-26 09:25:32 +02:00 committed by GitHub
parent 0cf5ba15fe
commit 5ede05f558
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 2663 additions and 62 deletions

View file

@ -1694,6 +1694,778 @@ exports[`APM telemetry helpers getApmTelemetry generates a JSON object with the
}
}
}
},
"metricset": {
"properties": {
"service_destination-1m": {
"properties": {
"all": {
"properties": {
"total": {
"properties": {
"shards": {
"type": "long",
"_meta": {
"description": "Total number of shards for the given metricset per rollup interval."
}
},
"docs": {
"properties": {
"count": {
"type": "long",
"_meta": {
"description": "Total number of metric documents in the primary shard for the given metricset per rollup interval"
}
}
}
},
"store": {
"properties": {
"size_in_bytes": {
"type": "long",
"_meta": {
"description": "Size of the metric index in the primary shard for the given metricset per rollup interval"
}
}
}
}
}
}
}
},
"1d": {
"properties": {
"doc_count": {
"type": "long",
"_meta": {
"description": "Document count for the last day for a given metricset and rollup interval"
}
}
}
}
}
},
"service_destination-10m": {
"properties": {
"all": {
"properties": {
"total": {
"properties": {
"shards": {
"type": "long",
"_meta": {
"description": "Total number of shards for the given metricset per rollup interval."
}
},
"docs": {
"properties": {
"count": {
"type": "long",
"_meta": {
"description": "Total number of metric documents in the primary shard for the given metricset per rollup interval"
}
}
}
},
"store": {
"properties": {
"size_in_bytes": {
"type": "long",
"_meta": {
"description": "Size of the metric index in the primary shard for the given metricset per rollup interval"
}
}
}
}
}
}
}
},
"1d": {
"properties": {
"doc_count": {
"type": "long",
"_meta": {
"description": "Document count for the last day for a given metricset and rollup interval"
}
}
}
}
}
},
"service_destination-60m": {
"properties": {
"all": {
"properties": {
"total": {
"properties": {
"shards": {
"type": "long",
"_meta": {
"description": "Total number of shards for the given metricset per rollup interval."
}
},
"docs": {
"properties": {
"count": {
"type": "long",
"_meta": {
"description": "Total number of metric documents in the primary shard for the given metricset per rollup interval"
}
}
}
},
"store": {
"properties": {
"size_in_bytes": {
"type": "long",
"_meta": {
"description": "Size of the metric index in the primary shard for the given metricset per rollup interval"
}
}
}
}
}
}
}
},
"1d": {
"properties": {
"doc_count": {
"type": "long",
"_meta": {
"description": "Document count for the last day for a given metricset and rollup interval"
}
}
}
}
}
},
"transaction-1m": {
"properties": {
"all": {
"properties": {
"total": {
"properties": {
"shards": {
"type": "long",
"_meta": {
"description": "Total number of shards for the given metricset per rollup interval."
}
},
"docs": {
"properties": {
"count": {
"type": "long",
"_meta": {
"description": "Total number of metric documents in the primary shard for the given metricset per rollup interval"
}
}
}
},
"store": {
"properties": {
"size_in_bytes": {
"type": "long",
"_meta": {
"description": "Size of the metric index in the primary shard for the given metricset per rollup interval"
}
}
}
}
}
}
}
},
"1d": {
"properties": {
"doc_count": {
"type": "long",
"_meta": {
"description": "Document count for the last day for a given metricset and rollup interval"
}
}
}
}
}
},
"transaction-10m": {
"properties": {
"all": {
"properties": {
"total": {
"properties": {
"shards": {
"type": "long",
"_meta": {
"description": "Total number of shards for the given metricset per rollup interval."
}
},
"docs": {
"properties": {
"count": {
"type": "long",
"_meta": {
"description": "Total number of metric documents in the primary shard for the given metricset per rollup interval"
}
}
}
},
"store": {
"properties": {
"size_in_bytes": {
"type": "long",
"_meta": {
"description": "Size of the metric index in the primary shard for the given metricset per rollup interval"
}
}
}
}
}
}
}
},
"1d": {
"properties": {
"doc_count": {
"type": "long",
"_meta": {
"description": "Document count for the last day for a given metricset and rollup interval"
}
}
}
}
}
},
"transaction-60m": {
"properties": {
"all": {
"properties": {
"total": {
"properties": {
"shards": {
"type": "long",
"_meta": {
"description": "Total number of shards for the given metricset per rollup interval."
}
},
"docs": {
"properties": {
"count": {
"type": "long",
"_meta": {
"description": "Total number of metric documents in the primary shard for the given metricset per rollup interval"
}
}
}
},
"store": {
"properties": {
"size_in_bytes": {
"type": "long",
"_meta": {
"description": "Size of the metric index in the primary shard for the given metricset per rollup interval"
}
}
}
}
}
}
}
},
"1d": {
"properties": {
"doc_count": {
"type": "long",
"_meta": {
"description": "Document count for the last day for a given metricset and rollup interval"
}
}
}
}
}
},
"service_summary-1m": {
"properties": {
"all": {
"properties": {
"total": {
"properties": {
"shards": {
"type": "long",
"_meta": {
"description": "Total number of shards for the given metricset per rollup interval."
}
},
"docs": {
"properties": {
"count": {
"type": "long",
"_meta": {
"description": "Total number of metric documents in the primary shard for the given metricset per rollup interval"
}
}
}
},
"store": {
"properties": {
"size_in_bytes": {
"type": "long",
"_meta": {
"description": "Size of the metric index in the primary shard for the given metricset per rollup interval"
}
}
}
}
}
}
}
},
"1d": {
"properties": {
"doc_count": {
"type": "long",
"_meta": {
"description": "Document count for the last day for a given metricset and rollup interval"
}
}
}
}
}
},
"service_summary-10m": {
"properties": {
"all": {
"properties": {
"total": {
"properties": {
"shards": {
"type": "long",
"_meta": {
"description": "Total number of shards for the given metricset per rollup interval."
}
},
"docs": {
"properties": {
"count": {
"type": "long",
"_meta": {
"description": "Total number of metric documents in the primary shard for the given metricset per rollup interval"
}
}
}
},
"store": {
"properties": {
"size_in_bytes": {
"type": "long",
"_meta": {
"description": "Size of the metric index in the primary shard for the given metricset per rollup interval"
}
}
}
}
}
}
}
},
"1d": {
"properties": {
"doc_count": {
"type": "long",
"_meta": {
"description": "Document count for the last day for a given metricset and rollup interval"
}
}
}
}
}
},
"service_summary-60m": {
"properties": {
"all": {
"properties": {
"total": {
"properties": {
"shards": {
"type": "long",
"_meta": {
"description": "Total number of shards for the given metricset per rollup interval."
}
},
"docs": {
"properties": {
"count": {
"type": "long",
"_meta": {
"description": "Total number of metric documents in the primary shard for the given metricset per rollup interval"
}
}
}
},
"store": {
"properties": {
"size_in_bytes": {
"type": "long",
"_meta": {
"description": "Size of the metric index in the primary shard for the given metricset per rollup interval"
}
}
}
}
}
}
}
},
"1d": {
"properties": {
"doc_count": {
"type": "long",
"_meta": {
"description": "Document count for the last day for a given metricset and rollup interval"
}
}
}
}
}
},
"service_transaction-1m": {
"properties": {
"all": {
"properties": {
"total": {
"properties": {
"shards": {
"type": "long",
"_meta": {
"description": "Total number of shards for the given metricset per rollup interval."
}
},
"docs": {
"properties": {
"count": {
"type": "long",
"_meta": {
"description": "Total number of metric documents in the primary shard for the given metricset per rollup interval"
}
}
}
},
"store": {
"properties": {
"size_in_bytes": {
"type": "long",
"_meta": {
"description": "Size of the metric index in the primary shard for the given metricset per rollup interval"
}
}
}
}
}
}
}
},
"1d": {
"properties": {
"doc_count": {
"type": "long",
"_meta": {
"description": "Document count for the last day for a given metricset and rollup interval"
}
}
}
}
}
},
"service_transaction-10m": {
"properties": {
"all": {
"properties": {
"total": {
"properties": {
"shards": {
"type": "long",
"_meta": {
"description": "Total number of shards for the given metricset per rollup interval."
}
},
"docs": {
"properties": {
"count": {
"type": "long",
"_meta": {
"description": "Total number of metric documents in the primary shard for the given metricset per rollup interval"
}
}
}
},
"store": {
"properties": {
"size_in_bytes": {
"type": "long",
"_meta": {
"description": "Size of the metric index in the primary shard for the given metricset per rollup interval"
}
}
}
}
}
}
}
},
"1d": {
"properties": {
"doc_count": {
"type": "long",
"_meta": {
"description": "Document count for the last day for a given metricset and rollup interval"
}
}
}
}
}
},
"service_transaction-60m": {
"properties": {
"all": {
"properties": {
"total": {
"properties": {
"shards": {
"type": "long",
"_meta": {
"description": "Total number of shards for the given metricset per rollup interval."
}
},
"docs": {
"properties": {
"count": {
"type": "long",
"_meta": {
"description": "Total number of metric documents in the primary shard for the given metricset per rollup interval"
}
}
}
},
"store": {
"properties": {
"size_in_bytes": {
"type": "long",
"_meta": {
"description": "Size of the metric index in the primary shard for the given metricset per rollup interval"
}
}
}
}
}
}
}
},
"1d": {
"properties": {
"doc_count": {
"type": "long",
"_meta": {
"description": "Document count for the last day for a given metricset and rollup interval"
}
}
}
}
}
},
"span_breakdown-1m": {
"properties": {
"all": {
"properties": {
"total": {
"properties": {
"shards": {
"type": "long",
"_meta": {
"description": "Total number of shards for the given metricset per rollup interval."
}
},
"docs": {
"properties": {
"count": {
"type": "long",
"_meta": {
"description": "Total number of metric documents in the primary shard for the given metricset per rollup interval"
}
}
}
},
"store": {
"properties": {
"size_in_bytes": {
"type": "long",
"_meta": {
"description": "Size of the metric index in the primary shard for the given metricset per rollup interval"
}
}
}
}
}
}
}
},
"1d": {
"properties": {
"doc_count": {
"type": "long",
"_meta": {
"description": "Document count for the last day for a given metricset and rollup interval"
}
}
}
}
}
},
"span_breakdown-10m": {
"properties": {
"all": {
"properties": {
"total": {
"properties": {
"shards": {
"type": "long",
"_meta": {
"description": "Total number of shards for the given metricset per rollup interval."
}
},
"docs": {
"properties": {
"count": {
"type": "long",
"_meta": {
"description": "Total number of metric documents in the primary shard for the given metricset per rollup interval"
}
}
}
},
"store": {
"properties": {
"size_in_bytes": {
"type": "long",
"_meta": {
"description": "Size of the metric index in the primary shard for the given metricset per rollup interval"
}
}
}
}
}
}
}
},
"1d": {
"properties": {
"doc_count": {
"type": "long",
"_meta": {
"description": "Document count for the last day for a given metricset and rollup interval"
}
}
}
}
}
},
"span_breakdown-60m": {
"properties": {
"all": {
"properties": {
"total": {
"properties": {
"shards": {
"type": "long",
"_meta": {
"description": "Total number of shards for the given metricset per rollup interval."
}
},
"docs": {
"properties": {
"count": {
"type": "long",
"_meta": {
"description": "Total number of metric documents in the primary shard for the given metricset per rollup interval"
}
}
}
},
"store": {
"properties": {
"size_in_bytes": {
"type": "long",
"_meta": {
"description": "Size of the metric index in the primary shard for the given metricset per rollup interval"
}
}
}
}
}
}
}
},
"1d": {
"properties": {
"doc_count": {
"type": "long",
"_meta": {
"description": "Document count for the last day for a given metricset and rollup interval"
}
}
}
}
}
},
"app": {
"properties": {
"all": {
"properties": {
"total": {
"properties": {
"shards": {
"type": "long",
"_meta": {
"description": "Total number of shards for the given metricset per rollup interval."
}
},
"docs": {
"properties": {
"count": {
"type": "long",
"_meta": {
"description": "Total number of metric documents in the primary shard for the given metricset per rollup interval"
}
}
}
},
"store": {
"properties": {
"size_in_bytes": {
"type": "long",
"_meta": {
"description": "Size of the metric index in the primary shard for the given metricset per rollup interval"
}
}
}
}
}
}
}
},
"1d": {
"properties": {
"doc_count": {
"type": "long",
"_meta": {
"description": "Document count for the last day for a given metricset and rollup interval"
}
}
}
}
}
}
}
}
}
},

View file

@ -0,0 +1,617 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`data telemetry collection tasks indices_stats returns a map of index stats 1`] = `
Object {
"indices": Object {
"all": Object {
"total": Object {
"docs": Object {
"count": 2,
},
"store": Object {
"size_in_bytes": 100,
},
},
},
"metric": Object {
"all": Object {
"total": Object {
"docs": Object {
"count": 2,
},
"store": Object {
"size_in_bytes": 100,
},
},
},
"metricset": Object {
"app": Object {
"1d": Object {
"doc_count": 6,
},
"all": Object {
"total": Object {
"docs": Object {
"count": 1,
},
"shards": 2,
"store": Object {
"size_in_bytes": 50,
},
},
},
},
"service_destination-10m": Object {
"1d": Object {
"doc_count": 3,
},
"all": Object {
"total": Object {
"docs": Object {
"count": 1,
},
"shards": 2,
"store": Object {
"size_in_bytes": 50,
},
},
},
},
"service_destination-1m": Object {
"1d": Object {
"doc_count": 3,
},
"all": Object {
"total": Object {
"docs": Object {
"count": 1,
},
"shards": 2,
"store": Object {
"size_in_bytes": 50,
},
},
},
},
"service_destination-60m": Object {
"1d": Object {
"doc_count": 3,
},
"all": Object {
"total": Object {
"docs": Object {
"count": 1,
},
"shards": 2,
"store": Object {
"size_in_bytes": 50,
},
},
},
},
"service_summary-10m": Object {
"1d": Object {
"doc_count": 9,
},
"all": Object {
"total": Object {
"docs": Object {
"count": 1,
},
"shards": 2,
"store": Object {
"size_in_bytes": 50,
},
},
},
},
"service_summary-1m": Object {
"1d": Object {
"doc_count": 12,
},
"all": Object {
"total": Object {
"docs": Object {
"count": 1,
},
"shards": 2,
"store": Object {
"size_in_bytes": 50,
},
},
},
},
"service_summary-60m": Object {
"1d": Object {
"doc_count": 9,
},
"all": Object {
"total": Object {
"docs": Object {
"count": 1,
},
"shards": 2,
"store": Object {
"size_in_bytes": 50,
},
},
},
},
"service_transaction-10m": Object {
"1d": Object {
"doc_count": 6,
},
"all": Object {
"total": Object {
"docs": Object {
"count": 1,
},
"shards": 2,
"store": Object {
"size_in_bytes": 50,
},
},
},
},
"service_transaction-1m": Object {
"1d": Object {
"doc_count": 6,
},
"all": Object {
"total": Object {
"docs": Object {
"count": 1,
},
"shards": 2,
"store": Object {
"size_in_bytes": 50,
},
},
},
},
"service_transaction-60m": Object {
"1d": Object {
"doc_count": 6,
},
"all": Object {
"total": Object {
"docs": Object {
"count": 1,
},
"shards": 2,
"store": Object {
"size_in_bytes": 50,
},
},
},
},
"span_breakdown-10m": Object {
"1d": Object {
"doc_count": 0,
},
"all": Object {
"total": Object {
"docs": Object {
"count": 1,
},
"shards": 2,
"store": Object {
"size_in_bytes": 50,
},
},
},
},
"span_breakdown-1m": Object {
"1d": Object {
"doc_count": 0,
},
"all": Object {
"total": Object {
"docs": Object {
"count": 1,
},
"shards": 2,
"store": Object {
"size_in_bytes": 50,
},
},
},
},
"span_breakdown-60m": Object {
"1d": Object {
"doc_count": 0,
},
"all": Object {
"total": Object {
"docs": Object {
"count": 1,
},
"shards": 2,
"store": Object {
"size_in_bytes": 50,
},
},
},
},
"transaction-10m": Object {
"1d": Object {
"doc_count": 6,
},
"all": Object {
"total": Object {
"docs": Object {
"count": 1,
},
"shards": 2,
"store": Object {
"size_in_bytes": 50,
},
},
},
},
"transaction-1m": Object {
"1d": Object {
"doc_count": 6,
},
"all": Object {
"total": Object {
"docs": Object {
"count": 1,
},
"shards": 2,
"store": Object {
"size_in_bytes": 50,
},
},
},
},
"transaction-60m": Object {
"1d": Object {
"doc_count": 6,
},
"all": Object {
"total": Object {
"docs": Object {
"count": 1,
},
"shards": 2,
"store": Object {
"size_in_bytes": 50,
},
},
},
},
},
"shards": Object {
"total": 2,
},
},
"shards": Object {
"total": 2,
},
"traces": Object {
"all": Object {
"total": Object {
"docs": Object {
"count": 2,
},
"store": Object {
"size_in_bytes": 100,
},
},
},
"shards": Object {
"total": 2,
},
},
},
}
`;
exports[`data telemetry collection tasks indices_stats with no results 1`] = `
Object {
"indices": Object {
"all": Object {
"total": Object {
"docs": Object {
"count": 0,
},
"store": Object {
"size_in_bytes": 0,
},
},
},
"metric": Object {
"all": Object {
"total": Object {
"docs": Object {
"count": 0,
},
"store": Object {
"size_in_bytes": 0,
},
},
},
"metricset": Object {
"app": Object {
"1d": Object {
"doc_count": 0,
},
"all": Object {
"total": Object {
"docs": Object {
"count": 0,
},
"shards": 0,
"store": Object {
"size_in_bytes": 0,
},
},
},
},
"service_destination-10m": Object {
"1d": Object {
"doc_count": 0,
},
"all": Object {
"total": Object {
"docs": Object {
"count": 0,
},
"shards": 0,
"store": Object {
"size_in_bytes": 0,
},
},
},
},
"service_destination-1m": Object {
"1d": Object {
"doc_count": 0,
},
"all": Object {
"total": Object {
"docs": Object {
"count": 0,
},
"shards": 0,
"store": Object {
"size_in_bytes": 0,
},
},
},
},
"service_destination-60m": Object {
"1d": Object {
"doc_count": 0,
},
"all": Object {
"total": Object {
"docs": Object {
"count": 0,
},
"shards": 0,
"store": Object {
"size_in_bytes": 0,
},
},
},
},
"service_summary-10m": Object {
"1d": Object {
"doc_count": 0,
},
"all": Object {
"total": Object {
"docs": Object {
"count": 0,
},
"shards": 0,
"store": Object {
"size_in_bytes": 0,
},
},
},
},
"service_summary-1m": Object {
"1d": Object {
"doc_count": 0,
},
"all": Object {
"total": Object {
"docs": Object {
"count": 0,
},
"shards": 0,
"store": Object {
"size_in_bytes": 0,
},
},
},
},
"service_summary-60m": Object {
"1d": Object {
"doc_count": 0,
},
"all": Object {
"total": Object {
"docs": Object {
"count": 0,
},
"shards": 0,
"store": Object {
"size_in_bytes": 0,
},
},
},
},
"service_transaction-10m": Object {
"1d": Object {
"doc_count": 0,
},
"all": Object {
"total": Object {
"docs": Object {
"count": 0,
},
"shards": 0,
"store": Object {
"size_in_bytes": 0,
},
},
},
},
"service_transaction-1m": Object {
"1d": Object {
"doc_count": 0,
},
"all": Object {
"total": Object {
"docs": Object {
"count": 0,
},
"shards": 0,
"store": Object {
"size_in_bytes": 0,
},
},
},
},
"service_transaction-60m": Object {
"1d": Object {
"doc_count": 0,
},
"all": Object {
"total": Object {
"docs": Object {
"count": 0,
},
"shards": 0,
"store": Object {
"size_in_bytes": 0,
},
},
},
},
"span_breakdown-10m": Object {
"1d": Object {
"doc_count": 0,
},
"all": Object {
"total": Object {
"docs": Object {
"count": 0,
},
"shards": 0,
"store": Object {
"size_in_bytes": 0,
},
},
},
},
"span_breakdown-1m": Object {
"1d": Object {
"doc_count": 0,
},
"all": Object {
"total": Object {
"docs": Object {
"count": 0,
},
"shards": 0,
"store": Object {
"size_in_bytes": 0,
},
},
},
},
"span_breakdown-60m": Object {
"1d": Object {
"doc_count": 0,
},
"all": Object {
"total": Object {
"docs": Object {
"count": 0,
},
"shards": 0,
"store": Object {
"size_in_bytes": 0,
},
},
},
},
"transaction-10m": Object {
"1d": Object {
"doc_count": 0,
},
"all": Object {
"total": Object {
"docs": Object {
"count": 0,
},
"shards": 0,
"store": Object {
"size_in_bytes": 0,
},
},
},
},
"transaction-1m": Object {
"1d": Object {
"doc_count": 0,
},
"all": Object {
"total": Object {
"docs": Object {
"count": 0,
},
"shards": 0,
"store": Object {
"size_in_bytes": 0,
},
},
},
},
"transaction-60m": Object {
"1d": Object {
"doc_count": 0,
},
"all": Object {
"total": Object {
"docs": Object {
"count": 0,
},
"shards": 0,
"store": Object {
"size_in_bytes": 0,
},
},
},
},
},
"shards": Object {
"total": 0,
},
},
"shards": Object {
"total": 0,
},
"traces": Object {
"all": Object {
"total": Object {
"docs": Object {
"count": 0,
},
"store": Object {
"size_in_bytes": 0,
},
},
},
"shards": Object {
"total": 0,
},
},
},
}
`;

View file

@ -12,6 +12,7 @@ import {
SERVICE_NAME,
SERVICE_ENVIRONMENT,
} from '../../../../common/es_fields/apm';
import { IndicesStatsResponse } from '../telemetry_client';
describe('data telemetry collection tasks', () => {
const indices = {
@ -376,74 +377,223 @@ describe('data telemetry collection tasks', () => {
const task = tasks.find((t) => t.name === 'indices_stats');
it('returns a map of index stats', async () => {
const indicesStats = jest.fn().mockResolvedValue({
_all: { total: { docs: { count: 1 }, store: { size_in_bytes: 1 } } },
_shards: { total: 1 },
});
const statsResponse = {
shards: {
total: 1,
const indicesStatsResponse: IndicesStatsResponse = {
_shards: {
total: 2,
},
all: {
_all: {
total: {
store: {
size_in_bytes: 100,
},
docs: {
count: 2,
},
},
primaries: {
docs: {
count: 1,
},
store: {
size_in_bytes: 1,
size_in_bytes: 50,
total_data_set_size_in_bytes: 50,
},
},
},
};
const searchResponse = {
aggregations: {
metricsets: {
buckets: [
{
key: 'service_transaction',
doc_count: 3240,
rollup_interval: {
buckets: [
{
key: '10m',
doc_count: 1080,
metrics_value_count: {
value: 6,
},
},
{
key: '1m',
doc_count: 1080,
metrics_value_count: {
value: 6,
},
},
{
key: '60m',
doc_count: 1080,
metrics_value_count: {
value: 6,
},
},
],
},
},
{
key: 'transaction',
doc_count: 3240,
rollup_interval: {
buckets: [
{
key: '10m',
doc_count: 1080,
metrics_value_count: {
value: 6,
},
},
{
key: '1m',
doc_count: 1080,
metrics_value_count: {
value: 6,
},
},
{
key: '60m',
doc_count: 1080,
metrics_value_count: {
value: 6,
},
},
],
},
},
{
key: 'service_destination',
doc_count: 1620,
rollup_interval: {
buckets: [
{
key: '10m',
doc_count: 540,
metrics_value_count: {
value: 3,
},
},
{
key: '1m',
doc_count: 540,
metrics_value_count: {
value: 3,
},
},
{
key: '60m',
doc_count: 540,
metrics_value_count: {
value: 3,
},
},
],
},
},
{
key: 'service_summary',
doc_count: 30,
rollup_interval: {
buckets: [
{
key: '1m',
doc_count: 12,
metrics_value_count: {
value: 12,
},
},
{
key: '10m',
doc_count: 9,
metrics_value_count: {
value: 9,
},
},
{
key: '60m',
doc_count: 9,
metrics_value_count: {
value: 9,
},
},
],
},
},
{
key: 'span_breakdown',
doc_count: 12,
rollup_interval: {
buckets: [],
},
},
{
key: 'app',
doc_count: 6,
rollup_interval: {
buckets: [],
},
},
],
},
},
};
const indicesStats = jest.fn().mockResolvedValue(indicesStatsResponse);
const search = jest.fn().mockResolvedValue(searchResponse);
expect(
await task?.executor({
indices,
telemetryClient: { indicesStats },
} as any)
).toEqual({
indices: {
...statsResponse,
metric: statsResponse,
traces: statsResponse,
},
});
});
describe('with no results', () => {
it('returns zero values', async () => {
const indicesStats = jest.fn().mockResolvedValue({});
const statsResponse = {
shards: {
total: 0,
telemetryClient: {
indicesStats,
search,
},
all: {
total: {
docs: {
count: 0,
},
store: {
size_in_bytes: 0,
},
} as any)
).toMatchSnapshot();
});
it('with no results', async () => {
const indicesStatsResponse: IndicesStatsResponse = {
_shards: {
total: 0,
},
_all: {
total: {
store: {
size_in_bytes: 0,
},
docs: {
count: 0,
},
},
};
expect(
await task?.executor({
indices,
telemetryClient: { indicesStats },
} as any)
).toEqual({
indices: {
...statsResponse,
metric: statsResponse,
traces: statsResponse,
primaries: {
docs: {
count: 0,
},
store: {
size_in_bytes: 0,
total_data_set_size_in_bytes: 0,
},
},
});
});
},
};
const searchResponse = {};
const indicesStats = jest.fn().mockResolvedValue(indicesStatsResponse);
const search = jest.fn().mockResolvedValue(searchResponse);
expect(
await task?.executor({
indices,
telemetryClient: {
indicesStats,
search,
},
} as any)
).toMatchSnapshot();
});
});

View file

@ -26,6 +26,8 @@ import {
HOST_NAME,
HOST_OS_PLATFORM,
KUBERNETES_POD_NAME,
METRICSET_INTERVAL,
METRICSET_NAME,
OBSERVER_HOSTNAME,
PARENT_ID,
PROCESSOR_EVENT,
@ -39,12 +41,12 @@ import {
SERVICE_RUNTIME_NAME,
SERVICE_RUNTIME_VERSION,
SERVICE_VERSION,
SPAN_DESTINATION_SERVICE_RESOURCE,
TRACE_ID,
TRANSACTION_NAME,
TRANSACTION_RESULT,
TRANSACTION_TYPE,
USER_AGENT_ORIGINAL,
SPAN_DESTINATION_SERVICE_RESOURCE,
} from '../../../../common/es_fields/apm';
import {
APM_SERVICE_GROUP_SAVED_OBJECT_TYPE,
@ -57,9 +59,18 @@ import { APMError } from '../../../../typings/es_schemas/ui/apm_error';
import { AgentName } from '../../../../typings/es_schemas/ui/fields/agent';
import { Span } from '../../../../typings/es_schemas/ui/span';
import { Transaction } from '../../../../typings/es_schemas/ui/transaction';
import { APMTelemetry, APMPerService, APMDataTelemetry } from '../types';
import {
APMDataTelemetry,
APMPerService,
APMTelemetry,
DataStreamStats,
MetricNotSupportingRollup,
MetricRollupIntervals,
MetricSupportingRollUp,
} from '../types';
import { APM_AGENT_CONFIGURATION_INDEX } from '../../../routes/settings/apm_indices/apm_system_index_constants';
import { TelemetryClient } from '../telemetry_client';
import { IndicesStatsResponse, TelemetryClient } from '../telemetry_client';
import { RollupInterval } from '../../../../common/rollup';
type ISavedObjectsClient = Pick<SavedObjectsClient, 'find'>;
const TIME_RANGES = ['1d', 'all'] as const;
@ -1082,6 +1093,163 @@ export const tasks: TelemetryTask[] = [
{
name: 'indices_stats',
executor: async ({ indices, telemetryClient }) => {
const dataStreamStatsDictionary = {} as DataStreamStats;
const metricSetsSupportingRollUps: MetricSupportingRollUp[] = [
'service_destination',
'service_transaction',
'service_summary',
'transaction',
'span_breakdown',
];
const metricSetsNotSupportingRollUps: MetricNotSupportingRollup[] = [
'app',
];
const rollUpIntervals: MetricRollupIntervals[] = [
RollupInterval.OneMinute,
RollupInterval.TenMinutes,
RollupInterval.SixtyMinutes,
];
const populateDataStreamStatsDict = (
ds: DataStreamStats,
key: string,
response: IndicesStatsResponse
) => {
ds[key] = ds[key] || {};
ds[key].all = {
total: {
shards: response?._shards?.total ?? 0,
docs: {
count: response?._all?.primaries?.docs?.count ?? 0,
},
store: {
size_in_bytes:
response?._all?.primaries?.store?.size_in_bytes ?? 0,
},
},
};
return ds;
};
// The API calls must be done in series rather than in parallel due to the nature
// of how tasks are executed. We don't want to burden the customers instances
// which could directly impact the performance on the UI.
const fetchRollupMetrics = async () => {
for (const metricSet of metricSetsSupportingRollUps) {
for (const bucketSize of rollUpIntervals) {
const datastream = `metrics-apm.${metricSet}.${bucketSize}-*`;
const response = await telemetryClient.indicesStats({
index: [datastream],
expand_wildcards: 'all',
filter_path: [
'_all.primaries.docs',
'_all.primaries.store',
'_shards',
],
});
populateDataStreamStatsDict(
dataStreamStatsDictionary,
`${metricSet}-${bucketSize}`,
response
);
}
}
};
const fetchMetricWithoutRollup = async () => {
for (const metricSet of metricSetsNotSupportingRollUps) {
const datastream = `metrics-apm.${metricSet}*`;
const response = await telemetryClient.indicesStats({
index: [datastream],
expand_wildcards: 'all',
filter_path: [
'_all.primaries.docs',
'_all.primaries.store',
'_shards',
],
});
populateDataStreamStatsDict(
dataStreamStatsDictionary,
metricSet,
response
);
}
};
await fetchRollupMetrics();
await fetchMetricWithoutRollup();
const lastDayStatsResponse = await telemetryClient.search({
index: [indices.metric],
expand_wildcards: 'all',
body: {
track_total_hits: false,
size: 0,
timeout,
query: range1d,
aggs: {
metricsets: {
terms: {
field: METRICSET_NAME,
},
aggs: {
rollup_interval: {
terms: {
field: METRICSET_INTERVAL,
},
aggs: {
metrics_value_count: {
value_count: {
field: METRICSET_INTERVAL,
},
},
},
},
},
},
},
},
});
for (const metricSet of metricSetsSupportingRollUps) {
const metricSetData =
lastDayStatsResponse.aggregations?.metricsets?.buckets?.find(
(bucket) => bucket.key === metricSet
);
rollUpIntervals.forEach((interval) => {
const key = `${metricSet}-${interval}`;
dataStreamStatsDictionary[key]['1d'] = {
doc_count: 0,
};
});
if (metricSetData?.rollup_interval?.buckets) {
for (const intervalBucket of metricSetData.rollup_interval.buckets) {
const intervalKey = intervalBucket.key as MetricRollupIntervals;
const intervalDocCount = intervalBucket.metrics_value_count.value;
dataStreamStatsDictionary[`${metricSet}-${intervalKey}`]['1d'] = {
doc_count: intervalDocCount,
};
}
}
}
for (const metricSet of metricSetsNotSupportingRollUps) {
const metricSetData =
lastDayStatsResponse.aggregations?.metricsets?.buckets?.find(
(bucket) => bucket.key === metricSet
);
dataStreamStatsDictionary[metricSet]['1d'] = {
doc_count: metricSetData?.doc_count || 0,
};
}
const response = await telemetryClient.indicesStats({
index: [
APM_AGENT_CONFIGURATION_INDEX,
@ -1119,6 +1287,9 @@ export const tasks: TelemetryTask[] = [
},
},
},
metricset: {
...dataStreamStatsDictionary,
},
},
traces: {
shards: {

View file

@ -6,7 +6,12 @@
*/
import { MakeSchemaFrom } from '@kbn/usage-collection-plugin/server';
import { AggregatedTransactionsCounts, APMUsage, APMPerService } from './types';
import {
AggregatedTransactionsCounts,
APMUsage,
APMPerService,
DataStreamCombined,
} from './types';
import { ElasticAgentName } from '../../../typings/es_schemas/ui/fields/agent';
const aggregatedTransactionCountSchema: MakeSchemaFrom<
@ -27,6 +32,47 @@ const aggregatedTransactionCountSchema: MakeSchemaFrom<
},
};
const dataStreamCombinedSchema: MakeSchemaFrom<DataStreamCombined, true> = {
all: {
total: {
shards: {
type: 'long',
_meta: {
description:
'Total number of shards for the given metricset per rollup interval.',
},
},
docs: {
count: {
type: 'long',
_meta: {
description:
'Total number of metric documents in the primary shard for the given metricset per rollup interval',
},
},
},
store: {
size_in_bytes: {
type: 'long',
_meta: {
description:
'Size of the metric index in the primary shard for the given metricset per rollup interval',
},
},
},
},
},
'1d': {
doc_count: {
type: 'long',
_meta: {
description:
'Document count for the last day for a given metricset and rollup interval',
},
},
},
};
const agentSchema: MakeSchemaFrom<APMUsage, true>['agents'][ElasticAgentName] =
{
agent: {
@ -924,6 +970,29 @@ export const apmSchema: MakeSchemaFrom<APMUsage, true> = {
},
},
},
metricset: {
'service_destination-1m': dataStreamCombinedSchema,
'service_destination-10m': dataStreamCombinedSchema,
'service_destination-60m': dataStreamCombinedSchema,
'transaction-1m': dataStreamCombinedSchema,
'transaction-10m': dataStreamCombinedSchema,
'transaction-60m': dataStreamCombinedSchema,
'service_summary-1m': dataStreamCombinedSchema,
'service_summary-10m': dataStreamCombinedSchema,
'service_summary-60m': dataStreamCombinedSchema,
'service_transaction-1m': dataStreamCombinedSchema,
'service_transaction-10m': dataStreamCombinedSchema,
'service_transaction-60m': dataStreamCombinedSchema,
'span_breakdown-1m': dataStreamCombinedSchema,
'span_breakdown-10m': dataStreamCombinedSchema,
'span_breakdown-60m': dataStreamCombinedSchema,
app: dataStreamCombinedSchema,
},
},
traces: {
shards: {

View file

@ -15,6 +15,22 @@ interface RequiredSearchParams {
body: { size: number; track_total_hits: boolean | number; timeout: string };
}
export interface IndicesStatsResponse {
_all?: {
total?: { store?: { size_in_bytes?: number }; docs?: { count?: number } };
primaries?: {
docs?: { count?: number };
store?: {
size_in_bytes?: number;
total_data_set_size_in_bytes?: number;
};
};
};
_shards?: {
total?: number;
};
}
export interface TelemetryClient {
search<TSearchRequest extends ESSearchRequest & RequiredSearchParams>(
params: TSearchRequest
@ -24,14 +40,7 @@ export interface TelemetryClient {
params: estypes.IndicesStatsRequest
// promise returned by client has an abort property
// so we cannot use its ReturnType
): Promise<{
_all?: {
total?: { store?: { size_in_bytes?: number }; docs?: { count?: number } };
};
_shards?: {
total?: number;
};
}>;
): Promise<IndicesStatsResponse>;
transportRequest: (params: {
path: string;

View file

@ -10,6 +10,7 @@ import {
AgentName,
ElasticAgentName,
} from '../../../typings/es_schemas/ui/fields/agent';
import { RollupInterval } from '../../../common/rollup';
export interface TimeframeMap {
'1d': number;
@ -191,6 +192,7 @@ export interface APMUsage {
};
};
};
metricset: DataStreamStats;
};
shards: {
total: number;
@ -236,6 +238,45 @@ export interface APMUsage {
>;
}
export type MetricRollupIntervals =
| RollupInterval.OneMinute
| RollupInterval.TenMinutes
| RollupInterval.SixtyMinutes;
export type MetricSupportingRollUp =
| 'service_destination'
| 'transaction'
| 'service_summary'
| 'service_transaction'
| 'span_breakdown';
export type MetricNotSupportingRollup = 'app';
export type MetricTypes = MetricSupportingRollUp | MetricNotSupportingRollup;
export interface CapturedMetricStats {
total: {
shards: number;
docs: {
count: number;
};
store: {
size_in_bytes: number;
};
};
}
export interface LastDayCount {
doc_count: number;
}
export interface DataStreamCombined {
all: CapturedMetricStats;
'1d': LastDayCount;
}
export type DataStreamStats = Record<string, DataStreamCombined>;
export type APMDataTelemetry = DeepPartial<APMUsage>;
export type APMTelemetry = APMDataTelemetry;

View file

@ -4786,6 +4786,778 @@
}
}
}
},
"metricset": {
"properties": {
"service_destination-1m": {
"properties": {
"all": {
"properties": {
"total": {
"properties": {
"shards": {
"type": "long",
"_meta": {
"description": "Total number of shards for the given metricset per rollup interval."
}
},
"docs": {
"properties": {
"count": {
"type": "long",
"_meta": {
"description": "Total number of metric documents in the primary shard for the given metricset per rollup interval"
}
}
}
},
"store": {
"properties": {
"size_in_bytes": {
"type": "long",
"_meta": {
"description": "Size of the metric index in the primary shard for the given metricset per rollup interval"
}
}
}
}
}
}
}
},
"1d": {
"properties": {
"doc_count": {
"type": "long",
"_meta": {
"description": "Document count for the last day for a given metricset and rollup interval"
}
}
}
}
}
},
"service_destination-10m": {
"properties": {
"all": {
"properties": {
"total": {
"properties": {
"shards": {
"type": "long",
"_meta": {
"description": "Total number of shards for the given metricset per rollup interval."
}
},
"docs": {
"properties": {
"count": {
"type": "long",
"_meta": {
"description": "Total number of metric documents in the primary shard for the given metricset per rollup interval"
}
}
}
},
"store": {
"properties": {
"size_in_bytes": {
"type": "long",
"_meta": {
"description": "Size of the metric index in the primary shard for the given metricset per rollup interval"
}
}
}
}
}
}
}
},
"1d": {
"properties": {
"doc_count": {
"type": "long",
"_meta": {
"description": "Document count for the last day for a given metricset and rollup interval"
}
}
}
}
}
},
"service_destination-60m": {
"properties": {
"all": {
"properties": {
"total": {
"properties": {
"shards": {
"type": "long",
"_meta": {
"description": "Total number of shards for the given metricset per rollup interval."
}
},
"docs": {
"properties": {
"count": {
"type": "long",
"_meta": {
"description": "Total number of metric documents in the primary shard for the given metricset per rollup interval"
}
}
}
},
"store": {
"properties": {
"size_in_bytes": {
"type": "long",
"_meta": {
"description": "Size of the metric index in the primary shard for the given metricset per rollup interval"
}
}
}
}
}
}
}
},
"1d": {
"properties": {
"doc_count": {
"type": "long",
"_meta": {
"description": "Document count for the last day for a given metricset and rollup interval"
}
}
}
}
}
},
"transaction-1m": {
"properties": {
"all": {
"properties": {
"total": {
"properties": {
"shards": {
"type": "long",
"_meta": {
"description": "Total number of shards for the given metricset per rollup interval."
}
},
"docs": {
"properties": {
"count": {
"type": "long",
"_meta": {
"description": "Total number of metric documents in the primary shard for the given metricset per rollup interval"
}
}
}
},
"store": {
"properties": {
"size_in_bytes": {
"type": "long",
"_meta": {
"description": "Size of the metric index in the primary shard for the given metricset per rollup interval"
}
}
}
}
}
}
}
},
"1d": {
"properties": {
"doc_count": {
"type": "long",
"_meta": {
"description": "Document count for the last day for a given metricset and rollup interval"
}
}
}
}
}
},
"transaction-10m": {
"properties": {
"all": {
"properties": {
"total": {
"properties": {
"shards": {
"type": "long",
"_meta": {
"description": "Total number of shards for the given metricset per rollup interval."
}
},
"docs": {
"properties": {
"count": {
"type": "long",
"_meta": {
"description": "Total number of metric documents in the primary shard for the given metricset per rollup interval"
}
}
}
},
"store": {
"properties": {
"size_in_bytes": {
"type": "long",
"_meta": {
"description": "Size of the metric index in the primary shard for the given metricset per rollup interval"
}
}
}
}
}
}
}
},
"1d": {
"properties": {
"doc_count": {
"type": "long",
"_meta": {
"description": "Document count for the last day for a given metricset and rollup interval"
}
}
}
}
}
},
"transaction-60m": {
"properties": {
"all": {
"properties": {
"total": {
"properties": {
"shards": {
"type": "long",
"_meta": {
"description": "Total number of shards for the given metricset per rollup interval."
}
},
"docs": {
"properties": {
"count": {
"type": "long",
"_meta": {
"description": "Total number of metric documents in the primary shard for the given metricset per rollup interval"
}
}
}
},
"store": {
"properties": {
"size_in_bytes": {
"type": "long",
"_meta": {
"description": "Size of the metric index in the primary shard for the given metricset per rollup interval"
}
}
}
}
}
}
}
},
"1d": {
"properties": {
"doc_count": {
"type": "long",
"_meta": {
"description": "Document count for the last day for a given metricset and rollup interval"
}
}
}
}
}
},
"service_summary-1m": {
"properties": {
"all": {
"properties": {
"total": {
"properties": {
"shards": {
"type": "long",
"_meta": {
"description": "Total number of shards for the given metricset per rollup interval."
}
},
"docs": {
"properties": {
"count": {
"type": "long",
"_meta": {
"description": "Total number of metric documents in the primary shard for the given metricset per rollup interval"
}
}
}
},
"store": {
"properties": {
"size_in_bytes": {
"type": "long",
"_meta": {
"description": "Size of the metric index in the primary shard for the given metricset per rollup interval"
}
}
}
}
}
}
}
},
"1d": {
"properties": {
"doc_count": {
"type": "long",
"_meta": {
"description": "Document count for the last day for a given metricset and rollup interval"
}
}
}
}
}
},
"service_summary-10m": {
"properties": {
"all": {
"properties": {
"total": {
"properties": {
"shards": {
"type": "long",
"_meta": {
"description": "Total number of shards for the given metricset per rollup interval."
}
},
"docs": {
"properties": {
"count": {
"type": "long",
"_meta": {
"description": "Total number of metric documents in the primary shard for the given metricset per rollup interval"
}
}
}
},
"store": {
"properties": {
"size_in_bytes": {
"type": "long",
"_meta": {
"description": "Size of the metric index in the primary shard for the given metricset per rollup interval"
}
}
}
}
}
}
}
},
"1d": {
"properties": {
"doc_count": {
"type": "long",
"_meta": {
"description": "Document count for the last day for a given metricset and rollup interval"
}
}
}
}
}
},
"service_summary-60m": {
"properties": {
"all": {
"properties": {
"total": {
"properties": {
"shards": {
"type": "long",
"_meta": {
"description": "Total number of shards for the given metricset per rollup interval."
}
},
"docs": {
"properties": {
"count": {
"type": "long",
"_meta": {
"description": "Total number of metric documents in the primary shard for the given metricset per rollup interval"
}
}
}
},
"store": {
"properties": {
"size_in_bytes": {
"type": "long",
"_meta": {
"description": "Size of the metric index in the primary shard for the given metricset per rollup interval"
}
}
}
}
}
}
}
},
"1d": {
"properties": {
"doc_count": {
"type": "long",
"_meta": {
"description": "Document count for the last day for a given metricset and rollup interval"
}
}
}
}
}
},
"service_transaction-1m": {
"properties": {
"all": {
"properties": {
"total": {
"properties": {
"shards": {
"type": "long",
"_meta": {
"description": "Total number of shards for the given metricset per rollup interval."
}
},
"docs": {
"properties": {
"count": {
"type": "long",
"_meta": {
"description": "Total number of metric documents in the primary shard for the given metricset per rollup interval"
}
}
}
},
"store": {
"properties": {
"size_in_bytes": {
"type": "long",
"_meta": {
"description": "Size of the metric index in the primary shard for the given metricset per rollup interval"
}
}
}
}
}
}
}
},
"1d": {
"properties": {
"doc_count": {
"type": "long",
"_meta": {
"description": "Document count for the last day for a given metricset and rollup interval"
}
}
}
}
}
},
"service_transaction-10m": {
"properties": {
"all": {
"properties": {
"total": {
"properties": {
"shards": {
"type": "long",
"_meta": {
"description": "Total number of shards for the given metricset per rollup interval."
}
},
"docs": {
"properties": {
"count": {
"type": "long",
"_meta": {
"description": "Total number of metric documents in the primary shard for the given metricset per rollup interval"
}
}
}
},
"store": {
"properties": {
"size_in_bytes": {
"type": "long",
"_meta": {
"description": "Size of the metric index in the primary shard for the given metricset per rollup interval"
}
}
}
}
}
}
}
},
"1d": {
"properties": {
"doc_count": {
"type": "long",
"_meta": {
"description": "Document count for the last day for a given metricset and rollup interval"
}
}
}
}
}
},
"service_transaction-60m": {
"properties": {
"all": {
"properties": {
"total": {
"properties": {
"shards": {
"type": "long",
"_meta": {
"description": "Total number of shards for the given metricset per rollup interval."
}
},
"docs": {
"properties": {
"count": {
"type": "long",
"_meta": {
"description": "Total number of metric documents in the primary shard for the given metricset per rollup interval"
}
}
}
},
"store": {
"properties": {
"size_in_bytes": {
"type": "long",
"_meta": {
"description": "Size of the metric index in the primary shard for the given metricset per rollup interval"
}
}
}
}
}
}
}
},
"1d": {
"properties": {
"doc_count": {
"type": "long",
"_meta": {
"description": "Document count for the last day for a given metricset and rollup interval"
}
}
}
}
}
},
"span_breakdown-1m": {
"properties": {
"all": {
"properties": {
"total": {
"properties": {
"shards": {
"type": "long",
"_meta": {
"description": "Total number of shards for the given metricset per rollup interval."
}
},
"docs": {
"properties": {
"count": {
"type": "long",
"_meta": {
"description": "Total number of metric documents in the primary shard for the given metricset per rollup interval"
}
}
}
},
"store": {
"properties": {
"size_in_bytes": {
"type": "long",
"_meta": {
"description": "Size of the metric index in the primary shard for the given metricset per rollup interval"
}
}
}
}
}
}
}
},
"1d": {
"properties": {
"doc_count": {
"type": "long",
"_meta": {
"description": "Document count for the last day for a given metricset and rollup interval"
}
}
}
}
}
},
"span_breakdown-10m": {
"properties": {
"all": {
"properties": {
"total": {
"properties": {
"shards": {
"type": "long",
"_meta": {
"description": "Total number of shards for the given metricset per rollup interval."
}
},
"docs": {
"properties": {
"count": {
"type": "long",
"_meta": {
"description": "Total number of metric documents in the primary shard for the given metricset per rollup interval"
}
}
}
},
"store": {
"properties": {
"size_in_bytes": {
"type": "long",
"_meta": {
"description": "Size of the metric index in the primary shard for the given metricset per rollup interval"
}
}
}
}
}
}
}
},
"1d": {
"properties": {
"doc_count": {
"type": "long",
"_meta": {
"description": "Document count for the last day for a given metricset and rollup interval"
}
}
}
}
}
},
"span_breakdown-60m": {
"properties": {
"all": {
"properties": {
"total": {
"properties": {
"shards": {
"type": "long",
"_meta": {
"description": "Total number of shards for the given metricset per rollup interval."
}
},
"docs": {
"properties": {
"count": {
"type": "long",
"_meta": {
"description": "Total number of metric documents in the primary shard for the given metricset per rollup interval"
}
}
}
},
"store": {
"properties": {
"size_in_bytes": {
"type": "long",
"_meta": {
"description": "Size of the metric index in the primary shard for the given metricset per rollup interval"
}
}
}
}
}
}
}
},
"1d": {
"properties": {
"doc_count": {
"type": "long",
"_meta": {
"description": "Document count for the last day for a given metricset and rollup interval"
}
}
}
}
}
},
"app": {
"properties": {
"all": {
"properties": {
"total": {
"properties": {
"shards": {
"type": "long",
"_meta": {
"description": "Total number of shards for the given metricset per rollup interval."
}
},
"docs": {
"properties": {
"count": {
"type": "long",
"_meta": {
"description": "Total number of metric documents in the primary shard for the given metricset per rollup interval"
}
}
}
},
"store": {
"properties": {
"size_in_bytes": {
"type": "long",
"_meta": {
"description": "Size of the metric index in the primary shard for the given metricset per rollup interval"
}
}
}
}
}
}
}
},
"1d": {
"properties": {
"doc_count": {
"type": "long",
"_meta": {
"description": "Document count for the last day for a given metricset and rollup interval"
}
}
}
}
}
}
}
}
}
},