Skip to content

Commit

Permalink
Rename MetricSample.sample to MetricSample.value
Browse files Browse the repository at this point in the history
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 <tiyash.basu@frequenz.com>
  • Loading branch information
tiyash-basu-frequenz committed Mar 22, 2024
1 parent fbcc68b commit 5c0214d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion proto/frequenz/api/common/v1/metrics/metric_sample.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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.
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: {},
// }
// ],
Expand Down
4 changes: 2 additions & 2 deletions proto/frequenz/api/common/v1/microgrid/sensors/sensors.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down

0 comments on commit 5c0214d

Please sign in to comment.