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

[APM] Automatically select right resolution for transaction metrics #146683

Closed
dgieselaar opened this issue Nov 30, 2022 · 13 comments
Closed

[APM] Automatically select right resolution for transaction metrics #146683

dgieselaar opened this issue Nov 30, 2022 · 13 comments
Assignees
Labels
apm:performance APM UI - Performance Work Team:APM All issues that need APM UI Team support

Comments

@dgieselaar
Copy link
Member

dgieselaar commented Nov 30, 2022

We are planning to continuously rollup metrics in different resolutions, to improve query performance for bigger time ranges [1]. When querying transaction metrics, we should automatically select the right resolution to query by executing a pre-flight requests that determines the appropriate resolution, and whether data is available for that resolution.

The easiest way to do this is to change the implementation of getSearchTransactionsEvents to return a resolution instead of a boolean. We can also create a new function and incrementally replace usage of getSearchTransactionsEvents with the new function. If we go for a new function, it should ideally be fetched in TimeRangeMetadataContext.

[1] https://github.com/elastic/apm-dev/issues/877 (internal)

@dgieselaar dgieselaar added the Team:APM All issues that need APM UI Team support label Nov 30, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:APM)

@sorenlouv sorenlouv added apm:performance APM UI - Performance Work apm:release-feature APM UI - Release Feature Goal v8.7.0 labels Nov 30, 2022
@felixbarny
Copy link
Member

How do we handle the case where we only have only partial 1m data for the selected time range? Will we show data in 1m resolution but have missing data at the beginning of the time range? Or will we fall back to 10m resolution if it is retained longer than the 1m resolution?

@dgieselaar
Copy link
Member Author

if there's any data for given time frame for the preferred resolution, we will use the preferred resolution.

@graphaelli
Copy link
Member

Can you clarify whether this only covers the curated UI or also our bundled alerts?

@sorenlouv
Copy link
Member

Can you clarify whether this only covers the curated UI or also our bundled alerts?

My impression is that what Dario said is also the case for rules (created by APM UI). So if any data is found for the preferred resolution the rule will only take that into account when determining if it should trigger an alert.

We recently added a warning to rules that users should not decrease the lookback window to less than 5 minutes. This makes them more reliable when using transaction metrics where data will be at least 1 minute delayed and possibly more (network congestion, queueing etc).

If we want to support shorter lookback windows (less than 5 minutes) we may need to use transaction events instead of metrics in these cases - although that won't scale well.

@dgieselaar
Copy link
Member Author

@graphaelli @sqren I've opened #148507 to capture the work needed to make sure the UI, alerts and ML don't break.

@felixbarny
Copy link
Member

Is this done or is there something missing?

@dgieselaar
Copy link
Member Author

@felixbarny We've only migrated the service inventory, not other views that only use transaction metrics.

@felixbarny
Copy link
Member

ah, right

dgieselaar added a commit that referenced this issue Mar 23, 2023
…rics (#153162)

Migrates the transaction latency chart and the transaction group
statistics table to use service overview metrics/rollups when
appropriate.

Part of #152693 and
#146683 (the work is split up to
prevent a huge PR).

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Søren Louv-Jansen <sorenlouv@gmail.com>
@sorenlouv
Copy link
Member

@dgieselaar This is marked as "In Progress" and assigned to you. Is that still the case or should this be moved to the backlog?

@dgieselaar
Copy link
Member Author

@sqren yeah, it's a bit of an ongoing project, not everything that can be moved to rollups has moved to rollups - we should plan some additional work for the upcoming cycles if we have capacity. Alternatively, we can close this and put in a pitch for a future release.

@felixbarny
Copy link
Member

Can we have a meta-issue that tracks the changes that we've done so far and the ones that are pending?

@sorenlouv
Copy link
Member

Okay, closing this. I've created a meta issue for the issues we've closed and are currently working on: #157227

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:performance APM UI - Performance Work Team:APM All issues that need APM UI Team support
Projects
None yet
Development

No branches or pull requests

6 participants