Skip to content

Commit

Permalink
Rename AggregatedMetricSample to AggregatedMetricValue
Browse files Browse the repository at this point in the history
In out terminology, we refer to a "sample" as a data structure that stores
a value alongside a timestamp. Since the message `AggregatedMetricSample`
does not contain timestamps, it needs to be renamed.

Signed-off-by: Tiyash Basu <[email protected]>
  • Loading branch information
tiyash-basu-frequenz committed Mar 22, 2024
1 parent 56ed231 commit cb6cc75
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
- Renamed `SimpleMetricSample` to `SimpleMetricValue`, because it does not
contain a timestamp, so it does not represent a sample but a value.

- Renamed `AggregatedMetricSample` to `AggregatedMetricValue`, because it does not
contain a timestamp, so it does not represent a sample but a value.

## New Features

- Added a `Frequenz.api.common.v1.types.Decimal` type, compatible with
Expand Down
8 changes: 4 additions & 4 deletions proto/frequenz/api/common/v1/metrics/metric_sample.proto
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ message SimpleMetricValue {
// summaries—minimum, maximum, and average values. Individual measurements are
// are optional, accommodating scenarios where only subsets of this information
// are available.
message AggregatedMetricSample {
message AggregatedMetricValue {
// The derived average value of the metric.
float avg_value = 2;

Expand All @@ -46,19 +46,19 @@ message AggregatedMetricSample {
}

// MetricSampleVariant serves as a union type that can encapsulate either a
// `SimpleMetricValue` or an `AggregatedMetricSample`.
// `SimpleMetricValue` or an `AggregatedMetricValue`.
//
// This message is designed to offer flexibility in capturing different
// granularities of metric samples—either a simple single-point measurement
// or an aggregated set of measurements for a metric.
//
// A `MetricSampleVariant` can hold either a `SimpleMetricValue` or an
// `AggregatedMetricSample`, but not both simultaneously. Setting one will
// `AggregatedMetricValue`, but not both simultaneously. Setting one will
// nullify the other.
message MetricSampleVariant {
oneof metric_sample_type {
SimpleMetricValue simple_metric = 1;
AggregatedMetricSample aggregated_metric = 2;
AggregatedMetricValue aggregated_metric = 2;
}
}

Expand Down

0 comments on commit cb6cc75

Please sign in to comment.