diff --git a/esrally/mechanic/telemetry.py b/esrally/mechanic/telemetry.py index 70166f134..d6c13a1af 100644 --- a/esrally/mechanic/telemetry.py +++ b/esrally/mechanic/telemetry.py @@ -483,6 +483,7 @@ def record(self): for node_stats in current_sample: node_name = node_stats["name"] collected_node_stats = collections.OrderedDict() + collected_node_stats["name"] = "node-stats" if self.include_indices: collected_node_stats.update( diff --git a/tests/mechanic/telemetry_test.py b/tests/mechanic/telemetry_test.py index 687fda21d..17cb2c4cf 100644 --- a/tests/mechanic/telemetry_test.py +++ b/tests/mechanic/telemetry_test.py @@ -680,7 +680,11 @@ def test_stores_default_nodes_stats(self, metrics_store_put_doc): recorder = telemetry.NodeStatsRecorder(telemetry_params, cluster_name="remote", client=client, metrics_store=metrics_store) recorder.record() - metrics_store_put_doc.assert_called_once_with(NodeStatsRecorderTests.default_stats_response_flattened, + expected_doc = collections.OrderedDict() + expected_doc["name"] = "node-stats" + expected_doc.update(NodeStatsRecorderTests.default_stats_response_flattened) + + metrics_store_put_doc.assert_called_once_with(expected_doc, level=MetaInfoScope.node, node_name="rally0", meta_data=metrics_store_meta_data) @@ -864,7 +868,8 @@ def test_stores_all_nodes_stats(self, metrics_store_put_doc): recorder.record() metrics_store_put_doc.assert_called_once_with( - {"indices_docs_count": 76892364, + {"name": "node-stats", + "indices_docs_count": 76892364, "indices_docs_deleted": 324530, "indices_fielddata_evictions": 17, "indices_fielddata_memory_size_in_bytes": 6936,