-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for filtering metrics in data streams #179
Add support for filtering metrics in data streams #179
Conversation
Otherwise it makes it difficult to add links that make the lines go beyond the 80 character limit. Signed-off-by: Tiyash Basu <tiyash.basu@frequenz.com>
1479f57
to
25317e1
Compare
As discussed, the filters are optional now, so that users have a convenient way of fetching all metrics from a component, given that the list of available metrics can vary between components. |
25317e1
to
1dd6a51
Compare
This commit makes the filter for the data stream RPCs optional. This is implemented by moving the ID and metrics fields into a nested message, which is then added as the only field in the request. This allows the filter to be omitted, which will result in the server returning all metrics for all components or sensors. This is helpful for clients to easily know which metrics are available for a component or sensor. Otherwise, it may become difficult, given that the list if available metrics can very from one component to another. Signed-off-by: Tiyash Basu <tiyash.basu@frequenz.com>
I updated the PR based on comments here. I also changed the filter by moving the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2 optional comments. Otherwise LGTM!
1dd6a51
to
4d34a31
Compare
This commit adds support for filtering metrics in data streams. The request messages for receiving data streams have now been extended to consist of a list of metrics to be streamed. This allows the user to request only the metrics they are interested in, instead of receiving all of them. If this list is empty, then no data will be streamed, and the service will return an error. The filter for the data stream RPCs are optional. This is implemented by putting the metrics field into a nested message, which is then added as a field in the request message. This makes the filter optional, so users can apply filters only when they intend to. This allows the filter to be omitted, which will result in the server returning all metrics for the given component or sensor. Signed-off-by: Tiyash Basu <tiyash.basu@frequenz.com>
4d34a31
to
2357c5a
Compare
This change adds support for filtering metrics in data streams. The request messages for receiving data streams have now been extended to consist of a list of metrics to be streamed. This allows the user to request only the metrics they are interested in, instead of receiving all of them. If this list is empty, then no data will be streamed, and the service will return an error.