@@ -182,6 +182,18 @@ message SimpleAggregatedMetricValue {
182182 frequenz.api.common.v1.metrics.SimpleMetricValue sample = 2 ;
183183}
184184
185+ // Filter for sources for metrics, specified for a single metric at a time.
186+ // Specifying a metric here will only stream data for that metric where data
187+ // can be found tagged with the given source names.
188+ message MetricSourceOptions {
189+ // The metric for which sources will be filtered.
190+ frequenz.api.common.v1.metrics.Metric metric = 1 ;
191+
192+ // A list of sources to allow for the specified metric.
193+ // If this list is empty, then no data for this metric is streamed.
194+ repeated string metric_sources = 2 ;
195+ }
196+
185197// Message defining the request format for fetching historical metrics, such as electrical
186198// measurements, and other information for individual microgrid components.
187199//
@@ -312,6 +324,14 @@ message ReceiveMicrogridComponentsDataStreamRequest {
312324 // Optional time-based filter criteria.
313325 // If omitted, data will start streaming from the timestamp that the request was received.
314326 TimeFilter time_filter = 3 ;
327+
328+ // List of metric source filters
329+ // For the metrics present in this list, the data from only the specified
330+ // sources will be returned. If no sources are provided for a metric in this
331+ // list, then no data will be returned for the said metric.
332+ // For the metrics not present in this list, data from all of their sources will
333+ // be returned.
334+ repeated MetricSourceOptions metric_sources = 4 ;
315335 }
316336
317337 // Encapsulates the microgrid ID and the component IDs within that microgrid for which
0 commit comments