Skip to content
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

MetricsReader can use any of the available aggregation functions, not just "avg" #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alisonspencer
Copy link

Modifies MetricsReader to to return data using any of the aggregation funcs (avg, first, last, min, max) available in the low-level API, not just the average. This allows the user to retrieve both analog and boolean data points.

  • Adds a keyword argument aggregate_by to the MetricsReader.read() method to take in the aggregation function or functions
  • Updates internal functions within MetricsReader to pass aggregate_by through as needed.
  • Adds an aggregation parameter to the MetricValues dataclass, so that it's possible to track which aggregation function was used to retrieve the timeseries.
    The default behaviour of MetricsReader.read() remains the same (take the average value).

…ble in the low-level API by passing the appropriate list of string(s) to the MetricsReader.read() method through a newly added kwarg, `aggregate_by`. MetricsValues is also updated to include the aggregation function associated with the values returned.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant