-
Notifications
You must be signed in to change notification settings - Fork 9
KEP97: proposal for supporting aggregation functions for analysis values #106
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
Open
bacherfl
wants to merge
2
commits into
main
Choose a base branch
from
kep-97-analysis-value-aggregation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
text/0097-support-aggregation-functions-in-analysis-value-template.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # KEP 97 Support Aggregation functions in AnalysisValueTemplate | ||
|
|
||
| ## Motivation | ||
|
|
||
| Currently, only the `KeptnMetrics` CRD supports the use of aggregation functions | ||
| (see [here](https://github.com/keptn/lifecycle-toolkit/blob/5fac158a7ffed67f7502fe03683138d717ea1acd/metrics-operator/api/v1beta1/keptnmetric_types.go#L76)). | ||
| Supporting the same aggregation functions might also be useful for `AnalysisValueTemplates` as well, | ||
| to better support queries that return multiple data points of a time series. | ||
| This way, the provider returning the results for the AnalysisValueTemplate can check whether | ||
| there are multiple data points in the result for the query and apply the aggregation function in that case. | ||
|
|
||
| ## Proposed Design | ||
|
|
||
| The proposal is to extend the specification of the `AnalysisValueTemplates` with an `spec.aggregation` field, | ||
| similar to what is available in the `KeptnMetric` (see [specification](https://keptn.sh/latest/docs/reference/api-reference/metrics/v1beta1/#rangespec)). | ||
| Using this field, the metrics operator can inspect the result for an analysis value returned by a metrics provider., | ||
| and, if the aggregation function has been defined, use this function to aggregate the returned result if this is | ||
| an array of multiple values, as opposed to a single value. | ||
|
|
||
| ## Benefits | ||
|
|
||
| - Unified way of defining aggregation functions for query results containing multiple time series data points | ||
| - More flexibility in terms of which queries can be used for each provider | ||
|
|
||
| ## Open Questions | ||
|
|
||
| One argument that might speak against this feature is that usually monitoring provider | ||
| APIs support aggregation functions on their end already, | ||
| such as e.g. [DQL](https://docs.dynatrace.com/docs/platform/grail/dynatrace-query-language/functions#aggregation-functions), | ||
| so it might be sufficient to adapt queries for AnalysisValueTemplates to make use of the monitoring provider's aggregation capabilities. | ||
|
|
||
| ## References | ||
|
|
||
| See the following Github discussion for more context: https://github.com/keptn/lifecycle-toolkit/issues/2650#issuecomment-1906038916 | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.