-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[processor/transform] Aggregate metrics grouping by label #16224
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
If this were implemented, I think it should just be |
if possible, I would like to look at this ticket cc @evan-bradley |
Just for final sumarization, the Thank you! |
@odubajDT That all sounds good to me. I think it's fair to suggest that users run |
Thanks for the response! Do I understand correctly that these functions should be ran in the statements before the actual Correct me please if my assumption is wrong. |
Another thoughts for clarification: The current solution in
and additionally also provides a way to aggregate data points with a certain label values into a new label, like the following
Let's now think about a solution which covers these two cases. The first use-case is quite clear and may (from user perspective) look like the following:
Where the first attribute represents the aggregation type (min/max/mean/sum) and the second represents the label key(s) for aggregation. The second use-case might look like the following:
Where the first attribute represents the aggregation type (min/max/mean/sum), the second represents the label key for aggregation and the third one the values of the label, which will be aggregated. The open questions are the following:
Will therefore parameters 2 and 3 be optional?
Thank very much for the answers! |
That's right, if we update the attributes before running the Based on what I've seen from the equivalent functionality in the metrics transform processor, I see two paths for implementation:
Unless approach 1 significantly improves usability, I think it's okay to rely on approach 2.
I would assume that an aggregation that doesn't specify labels indicates that all data points should be aggregated and only matching attributes are retained. I would fall back on the behavior the metrics transform processor exhibits here as a default and we can deviate from that if we feel it doesn't make sense.
I think this should work, yes. If these types are all in the metrics transform processor functionality, I think they would work here. |
**Description:** <Describe what has changed.> - duplicated and enhanced aggregation business logic (with median function) for common usage in follow-up tickets - tests **Link to tracking Issue:** #16224 **Follow-ups:** - #33655 - #33334 - #33423 --------- Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
#33655) **Description:** - use aggregation business logic from `interval/core` - support `median` aggregation type - testing - docs **Link to tracking Issue:** #16224 **Depends on** #33669 --------- Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com> Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com>
…metrics (#33334) **Link to tracking Issue:** #16224 **Changes:** - implemented `aggregate_on_attributes` function (supporting sum/min/max/mean/median) for Sum, Gauge, Histogram, ExponentialHistogram - tests - documentation **Depends on** #33669 --------- Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com> Co-authored-by: Evan Bradley <11745660+evan-bradley@users.noreply.github.com>
… for metrics (open-telemetry#33423) **Link to tracking Issue:** open-telemetry#16224 **Changes:** - implemented `aggregate_on_attribute_value` function - tests - documentation **Depends on** open-telemetry#33669 --------- Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
… for metrics (open-telemetry#33423) **Link to tracking Issue:** open-telemetry#16224 **Changes:** - implemented `aggregate_on_attribute_value` function - tests - documentation **Depends on** open-telemetry#33669 --------- Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
Component(s)
processor/transform
Is your feature request related to a problem? Please describe.
The metricstransform already provides this but there is no way to do it in the transform processor.
e.g.
With this we can go from
to this
Describe the solution you'd like
A function to aggregate metric values grouping by a set of attributes
In the example I'm also renaming the metric but that could be done with a different function in a next step using
set(metric.name,"jvm_memory_bytes_used")
(Providing this just as an example, I don't know which could be the best syntax for this)
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: