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] Add range query to terms enum calls #159202

Closed
dgieselaar opened this issue Jun 7, 2023 · 6 comments · Fixed by #162614
Closed

[APM] Add range query to terms enum calls #159202

dgieselaar opened this issue Jun 7, 2023 · 6 comments · Fixed by #162614
Assignees
Labels
8.10 candidate apm:performance APM UI - Performance Work apm:stretch-goal apm:test-plan-done Pull request that was successfully tested during the test plan Team:APM All issues that need APM UI Team support

Comments

@dgieselaar
Copy link
Member

dgieselaar commented Jun 7, 2023

We don't add an index filter to all of our terms enum calls. This can lead to slowness if the request hits a node in the cold or frozen tier. We should always add an index filter, either with a range query with a reasonable range (e.g. the last 24 hours) or a must_not on _tier: data_cold, data_forozen.

Usages of terms enum without range query

const response = await apmEventClient.termsEnum('get_suggestions', {

Related https://github.com/elastic/sdh-beats/issues/3467 (internal)

@dgieselaar dgieselaar added Team:APM All issues that need APM UI Team support apm:performance APM UI - Performance Work labels Jun 7, 2023
@elasticmachine
Copy link
Contributor

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

@gbamparop
Copy link
Contributor

Can't we use the same time range that is selected in the UI as get_suggestions does? This can still hit cold / frozen data but it'll be consistent with the filters

@sorenlouv
Copy link
Member

sorenlouv commented Jun 8, 2023

It feels like a very easy fix to exclude the frozen/cold tier or add a time range filter. Prioritise for 8.9?

@dgieselaar
Copy link
Member Author

@gbamparop @sqren in both cases, sgtm. Btw, the sdh that triggered the creation of the issue turned out to be a Fleet performance bug.

@gbamparop
Copy link
Contributor

It feels like a very easy fix to exclude the frozen/cold tier or add a time range filter. Prioritise for 8.9?

I would suggest 8.10 by looking at our current workload and how much time is left for FF.

@achyutjhunjhunwala
Copy link
Contributor

Storage Explorer was the only missing page where the range query has now been successfully added

@achyutjhunjhunwala achyutjhunjhunwala added the apm:test-plan-done Pull request that was successfully tested during the test plan label Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.10 candidate apm:performance APM UI - Performance Work apm:stretch-goal apm:test-plan-done Pull request that was successfully tested during the test plan Team:APM All issues that need APM UI Team support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants