-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[APM] Consolidate various throughput calculations to a utility function #89486
Comments
Pinging @elastic/apm-ui (Team:apm) |
There's also the ES rate aggregation. Previously that was not a great option because it didn't support histograms but now that we can use _doc_count it might become a viable alternative again |
The rate agg sounds great! Would love to outsource this to ES. Less code for us and seems more solid. |
@sqren yes, i assumed this issue was also about rate per date histo bucket but not sure. Rate only is allowed as a child of a date histo agg, but maybe it can work outside of one as well, but the semantics are less clear. E.g. it would need a fixed start/end or it could take the min/max of a field as the range. Not sure if it's worth it though |
Yes, that's what I understood as well. Probably better to only use it for timeseries and keep calculating the averages manually like today. On a related note I wonder if of this will be useful in tackling: #89497 |
We have many instances of
const deltaAsMinutes = (end - start) / 1000 / 60;
followed byvalue / deltaAsMinutes
accross APM UI, these should all be using a shared function which defines this logic once.These instances can be found in
x-pack/plugins/apm/server/lib/*
:observability_overview/get_transaction_coordinates.ts
services/get_service_dependencies/index.ts
services/get_service_instances/get_service_instance_transaction_stats.ts
services/get_service_transaction_groups/get_transaction_groups_for_page.ts
services/get_service_transaction_groups/merge_transaction_group_data.ts
services/get_services/get_service_transaction_stats.ts
services/get_throughput.ts
transactions/get_throughput_charts/index.ts
transactions/get_throughput_charts/transform.ts
Related: #89350
The text was updated successfully, but these errors were encountered: