@@ -136,7 +136,7 @@ import "google/protobuf/timestamp.proto";
136136// over TLS (HTTPS).
137137//
138138service ReportingService {
139- // Streams metrics for a list of microgrid components.
139+ // Streams metrics for a list of microgrid electrical components.
140140 //
141141 // !!! note
142142 // This RPC endpoint streams metrics data for electrical components of one
@@ -261,14 +261,17 @@ message TimeFilter {
261261// values forward across intervals.
262262//
263263// !!! note "Resolution constraints"
264- // The service enforces an upper bound on the resampling resolution.
264+ // Resampling resolutions are fixed-duration intervals expressed in
265+ // seconds and are not calendar-aware. The service enforces an upper
266+ // bound on the resampling resolution.
265267//
266- // Resolutions larger than one calendar month are not supported, as
267- // they exceed the intended scope of telemetry resampling.
268+ // Resolutions larger than 7 days are not supported, as they exceed the
269+ // intended scope of fixed-duration telemetry resampling.
268270//
269271// Typical and recommended resolutions include 5 minutes, 15 minutes,
270- // 1 hour, and 1 day. Monthly resolution may be used for long-horizon
271- // analysis and backtesting.
272+ // 1 hour, 1 day, and 7 days. Longer-horizon or calendar-based aggregation
273+ // (for example monthly analysis) should be performed client-side on the
274+ // resampled data.
272275//
273276// !!! example "Example: Downsampling from 1-second to 15-minute intervals"
274277// The stored time series has a effective sampling resolution of Δt = 1
@@ -281,23 +284,35 @@ message TimeFilter {
281284// For each interval k:
282285// Ik = [T0 + k·ΔT, T0 + (k+1)·ΔT)
283286//
284- // The aggregated value A_k is by default the arithmetic mean of all
285- // samples whose timestamps ts satisfy: ts ∈ Ik
287+ // The aggregated value A_k is computed using the configured aggregation
288+ // method (see `downsampling_method`) and may additionally follow
289+ // metric-specific semantics.
290+ //
291+ // For example, for instantaneous metrics the arithmetic mean is commonly
292+ // used, while for cumulative (counter-like) metrics averaging is not
293+ // meaningful and a representative value within the interval is used
294+ // instead.
286295//
287296// The resampled series consists of points:
288297// (t = T0 + k·ΔT, value = A_k)
289298//
290299// !!! note "Real-time streams"
291300// For open-ended streams, resampling windows advance according to
292301// wall-clock time. Window emission is time-driven, not event-driven.
293- // As telemetry samples may arrive late (e.g. due to
294- // buffering, transport delays, or upstream batching) a window MAY be
295- // emitted even if the telemetry samples have not yet arrived during the
296- // interval. In consequence a resampling interval that has already been
297- // emitted MAY be re-emitted later with an updated value when additional
298- // samples for that interval arrive.
299- //
300- // Clients must be able to handle interval updates (upserts) and must not
302+ //
303+ // The service does not provide a fixed guarantee for when an interval’s
304+ // sample will be emitted. In particular, delivery latency may vary due to
305+ // buffering, transport delays, upstream batching, scheduling, or load.
306+ // Clients MUST NOT rely on sample arrival time to infer measurement time
307+ // or completeness.
308+ //
309+ // Because telemetry samples may arrive late, an interval MAY be emitted
310+ // before all telemetry for that interval has arrived. In consequence, a
311+ // resampling interval that has already been emitted MAY be re-emitted
312+ // later with an updated value when additional samples for that interval
313+ // arrive.
314+ //
315+ // Clients MUST be able to handle interval updates (upserts) and MUST NOT
301316// assume that emitted intervals are final.
302317//
303318message ResamplingOptions {
@@ -378,28 +393,18 @@ message AggregationConfig {
378393// within a microgrid or to calculate the average state of charge of several
379394// batteries.
380395//
381- // Depending on whether resampling is enabled in the request, it can
382- // represent either:
383- // • a point-in-time aggregated value (no resampling requested), or
384- // • an aggregated value for a resampling interval (resampling requested).
396+ // !!! note "Resampling is required"
397+ // Aggregated/formula streams always use resampling to align measurements
398+ // from various sources in time.
385399//
386400message SimpleAggregatedMetricValue {
387- // The UTC timestamp associated with this aggregated value.
388- //
389- // Semantics depend on whether resampling is enabled:
390- //
391- // • Without resampling:
392- // `sample_time` represents the origin time of the underlying
393- // telemetry measurement(s), i.e. the time at which the metric
394- // value was observed at the component or sensor. This is the
395- // original timestamp of the samples that were aggregated.
401+ // The UTC timestamp identifying the resampling interval.
396402 //
397- // • With resampling:
398- // `sample_time` represents the start of the resampling interval
399- // [t, t + ΔT) to which contributing telemetry samples are assigned
400- // based on their origin timestamps.
403+ // This timestamp is the start of the resampling interval [t, t + ΔT) to
404+ // which contributing telemetry measurements are assigned based on their
405+ // origin timestamps.
401406 //
402- // In all cases, `sample_time` refers to measurement time, not processing
407+ // `sample_time` refers to measurement time (interval start) , not processing
403408 // or emission time.
404409 google.protobuf.Timestamp sample_time = 1 ;
405410
0 commit comments