Skip to content

Commit cae8446

Browse files
Rename Timestamp fields to use _time suffix in Reporting API
- TimeFilter.start → start_time - TimeFilter.end → end_time - SimpleAggregatedMetricValue.sampled_at → sample_time - Update doc‑comments and JSON examples to refer to “time” instead of “timestamp”
1 parent 2ab69c5 commit cae8446

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

proto/frequenz/api/reporting/v1/reporting.proto

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,14 @@ message TimeFilter {
8989
// !!! info
9090
// If not provided, the query defaults to the earliest available data for the
9191
// specified microgrid components.
92-
google.protobuf.Timestamp start = 1;
92+
google.protobuf.Timestamp start_time = 1;
9393

9494
// Optional UTC end time for the query.
9595
//
9696
// !!! info
9797
// If not provided, the query will retrieve the requested data and continue
9898
// streaming all new data as it becomes available.
99-
google.protobuf.Timestamp end = 2;
99+
google.protobuf.Timestamp end_time = 2;
100100
}
101101

102102
// Resampling options for aggregated microgrid components data.
@@ -167,7 +167,7 @@ message SimpleAggregatedMetricValue {
167167
//
168168
// !!! info
169169
// This is the original timestamp of the samples that were aggregated.
170-
google.protobuf.Timestamp sampled_at = 1;
170+
google.protobuf.Timestamp sample_time = 1;
171171

172172
// The aggregated value of the metric.
173173
// float value = 2;
@@ -337,11 +337,11 @@ message ReceiveMicrogridComponentsDataStreamRequest {
337337
// metric_samples: [
338338
// /* all metrics belong to the same timestamp */
339339
// /* sample is type MetricSampleVariant */
340-
// { sampled_at: "2023-10-01T00:00:00Z", metric: "DC_VOLTAGE_V", sample: {...}, bounds: {...} },
341-
// { sampled_at: "2023-10-01T00:00:00Z", metric: "DC_CURRENT_A", sample: {...}, bounds: {...} }
340+
// { sample_time: "2023-10-01T00:00:00Z", metric: "DC_VOLTAGE_V", sample: {...}, bounds: {...} },
341+
// { sample_time: "2023-10-01T00:00:00Z", metric: "DC_CURRENT_A", sample: {...}, bounds: {...} }
342342
// ],
343343
// state: {
344-
// sampled_at: "2023-10-01T00:00:13.12Z",
344+
// sample_time: "2023-10-01T00:00:13.12Z",
345345
// states: ["COMPONENT_STATE_CHARGING", "CABLE_CONNECTED"],
346346
// warnings: []
347347
// errors: [],
@@ -352,11 +352,11 @@ message ReceiveMicrogridComponentsDataStreamRequest {
352352
// metric_samples: [
353353
// /* all metrics belong to the same timestamp */
354354
// /* sample is type MetricSampleVariant */
355-
// { sampled_at: "2023-10-01T00:00:00Z", metric: "DC_VOLTAGE_V", sample: {...}, bounds: {...} },
356-
// { sampled_at: "2023-10-01T00:00:00Z", metric: "DC_CURRENT_A", sample: {...}, bounds: {...} }
355+
// { sample_time: "2023-10-01T00:00:00Z", metric: "DC_VOLTAGE_V", sample: {...}, bounds: {...} },
356+
// { sample_time: "2023-10-01T00:00:00Z", metric: "DC_CURRENT_A", sample: {...}, bounds: {...} }
357357
// ],
358358
// state: {
359-
// sampled_at: "2023-10-01T00:00:13.12Z",
359+
// sample_time: "2023-10-01T00:00:13.12Z",
360360
// states: ["COMPONENT_STATE_ERROR"],
361361
// warnings: []
362362
// errors: ["COMPONENT_ERROR_CODE_BATTERY_RELAY_ERROR"],
@@ -419,7 +419,7 @@ message ReceiveAggregatedMicrogridComponentsDataStreamRequest {
419419
// aggregation_formula: "avg(1,2,3)"
420420
// },
421421
// sample {
422-
// sampled_at: '2023-10-01T00:00:00Z',
422+
// sample_time: '2023-10-01T00:00:00Z',
423423
// sample: { value: 42.5 }
424424
// }
425425
// }

0 commit comments

Comments
 (0)