From 5c0214db24e69aa7d8daac4ff8408cbcddb3c013 Mon Sep 17 00:00:00 2001 From: Tiyash Basu Date: Fri, 22 Mar 2024 18:28:22 +0100 Subject: [PATCH] Rename `MetricSample.sample` to `MetricSample.value` The datatype of this field is now `MetricValueVariant`, so this commit tries to rename the field to a more appropriate one. Signed-off-by: Tiyash Basu --- RELEASE_NOTES.md | 2 ++ proto/frequenz/api/common/v1/metrics/metric_sample.proto | 2 +- .../api/common/v1/microgrid/components/components.proto | 4 ++-- proto/frequenz/api/common/v1/microgrid/sensors/sensors.proto | 4 ++-- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 4c0c9ca0..6ff7e1fa 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -38,6 +38,8 @@ - Renamed `MetricSampleVariant` to `MetricValueVariant`. +- Rename `MetricSample.sample` to `MetricSample.value`. + ## New Features - Added a `Frequenz.api.common.v1.types.Decimal` type, compatible with diff --git a/proto/frequenz/api/common/v1/metrics/metric_sample.proto b/proto/frequenz/api/common/v1/metrics/metric_sample.proto index 751c2104..af37d611 100644 --- a/proto/frequenz/api/common/v1/metrics/metric_sample.proto +++ b/proto/frequenz/api/common/v1/metrics/metric_sample.proto @@ -178,7 +178,7 @@ message MetricSample { Metric metric = 2; // The value of the sampled metric. - MetricValueVariant sample = 3; + MetricValueVariant value = 3; // List of bounds that apply to the metric sample. // diff --git a/proto/frequenz/api/common/v1/microgrid/components/components.proto b/proto/frequenz/api/common/v1/microgrid/components/components.proto index 7a5571c7..38b9f831 100644 --- a/proto/frequenz/api/common/v1/microgrid/components/components.proto +++ b/proto/frequenz/api/common/v1/microgrid/components/components.proto @@ -214,13 +214,13 @@ message ComponentConnection { // { // sampled_at: "2023-10-01T00:00:00Z", // metric: "DC_VOLTAGE_V", -// sample: {}, +// value: {}, // bounds: {}, // }, // { // sampled_at: "2023-10-01T00:00:00Z", // metric: "DC_VOLTAGE_V", -// sample: {}, +// value: {}, // bounds: {}, // } // ], diff --git a/proto/frequenz/api/common/v1/microgrid/sensors/sensors.proto b/proto/frequenz/api/common/v1/microgrid/sensors/sensors.proto index 1fcb7c44..772d7562 100644 --- a/proto/frequenz/api/common/v1/microgrid/sensors/sensors.proto +++ b/proto/frequenz/api/common/v1/microgrid/sensors/sensors.proto @@ -120,12 +120,12 @@ enum SensorMetric { // { // sampled_at: "2023-10-01T00:00:00Z", // metric: "METRIC_SENSOR_TEMPERATURE", -// sample: metric_value_variant: {simple_metric: {value: 23.5}, +// value: metric_value_variant: {simple_metric: {value: 23.5}, // }, // { // sampled_at: "2023-10-01T00:00:00Z", // metric: "METRIC_SENSOR_RELATIVE_HUMIDITY", -// sample: metric_value_variant: {simple_metric: {value: 23.5}, +// value: metric_value_variant: {simple_metric: {value: 23.5}, // } // ], // states: [