Skip to content

Commit 5c0214d

Browse files
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 <[email protected]>
1 parent fbcc68b commit 5c0214d

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

RELEASE_NOTES.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@
3838

3939
- Renamed `MetricSampleVariant` to `MetricValueVariant`.
4040

41+
- Rename `MetricSample.sample` to `MetricSample.value`.
42+
4143
## New Features
4244

4345
- Added a `Frequenz.api.common.v1.types.Decimal` type, compatible with

proto/frequenz/api/common/v1/metrics/metric_sample.proto

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ message MetricSample {
178178
Metric metric = 2;
179179

180180
// The value of the sampled metric.
181-
MetricValueVariant sample = 3;
181+
MetricValueVariant value = 3;
182182

183183
// List of bounds that apply to the metric sample.
184184
//

proto/frequenz/api/common/v1/microgrid/components/components.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,13 +214,13 @@ message ComponentConnection {
214214
// {
215215
// sampled_at: "2023-10-01T00:00:00Z",
216216
// metric: "DC_VOLTAGE_V",
217-
// sample: {},
217+
// value: {},
218218
// bounds: {},
219219
// },
220220
// {
221221
// sampled_at: "2023-10-01T00:00:00Z",
222222
// metric: "DC_VOLTAGE_V",
223-
// sample: {},
223+
// value: {},
224224
// bounds: {},
225225
// }
226226
// ],

proto/frequenz/api/common/v1/microgrid/sensors/sensors.proto

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,12 +120,12 @@ enum SensorMetric {
120120
// {
121121
// sampled_at: "2023-10-01T00:00:00Z",
122122
// metric: "METRIC_SENSOR_TEMPERATURE",
123-
// sample: metric_value_variant: {simple_metric: {value: 23.5},
123+
// value: metric_value_variant: {simple_metric: {value: 23.5},
124124
// },
125125
// {
126126
// sampled_at: "2023-10-01T00:00:00Z",
127127
// metric: "METRIC_SENSOR_RELATIVE_HUMIDITY",
128-
// sample: metric_value_variant: {simple_metric: {value: 23.5},
128+
// value: metric_value_variant: {simple_metric: {value: 23.5},
129129
// }
130130
// ],
131131
// states: [

0 commit comments

Comments
 (0)