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] Number of instances are limited to ~50-100 instances #167633

Closed
sorenlouv opened this issue Sep 29, 2023 · 2 comments · Fixed by #174164
Closed

[APM] Number of instances are limited to ~50-100 instances #167633

sorenlouv opened this issue Sep 29, 2023 · 2 comments · Fixed by #174164
Assignees
Labels
apm:service-overview bug Fixes for quality problems that affect the customer experience Team:APM All issues that need APM UI Team support v8.13.0

Comments

@sorenlouv
Copy link
Member

sorenlouv commented Sep 29, 2023

Related: https://github.com/elastic/sdh-apm/issues/1090 (internal)

image

Problem

The instance table on the Service Overview page is limited to 50 instances (it may show up to max 100 instances due to how items are fetched):

This means that if the user has more than 50 instances they are not guarenteed to show up. If they have more than 100 instances they can be sure that not every instance shows up in the list.

Client side sorting issue
Having a limit is fine but in that case it is important that sorting happens on the server, in order to surface the "top instances" based on the selected sort dimension. Currently when the user clicks a table heading, sorting happens on the client which means that we don't necesarily surface the true "top instances" but only the instances already loaded.

Solution

  • Rename header from "Instances" to "Top 100 instances"
  • Ensure that sorting happens on the server instead of the client
@sorenlouv sorenlouv added bug Fixes for quality problems that affect the customer experience Team:APM All issues that need APM UI Team support 8.12 candidate labels Sep 29, 2023
@elasticmachine
Copy link
Contributor

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

@crespocarlos
Copy link
Contributor

crespocarlos commented Nov 9, 2023

@sqren , to sort on the server, did you have in mind using the order parameter from the terms aggs?

So, I briefly looked at the code and the queries run avg aggregations. Sorting by sub-aggregations is not safe and not recommended either, due to the possibility of ES producing wrong results (see here).I think this is the similar blocker we've had in the hosts view.

memory_usage_cgroup and memory_usage_system both are bucket script aggregations. I might be wrong, but I don't think it's possible by to sort Pipeline aggregations.

I'll keep investigating, but these are my first thoughts after looking into it.

@crespocarlos crespocarlos removed their assignment Dec 14, 2023
@cauemarcondes cauemarcondes self-assigned this Dec 28, 2023
cauemarcondes added a commit that referenced this issue Jan 30, 2024
closes #167633

- Move sorting to the backend, so we don't miss any document.
- Query 1000 instances sort it and slice to return Top 100 instances.
- Adding API tests.



https://github.com/elastic/kibana/assets/55978943/3c1b746a-799a-4195-8a29-230b2547c53b
nreese pushed a commit to nreese/kibana that referenced this issue Jan 31, 2024
closes elastic#167633

- Move sorting to the backend, so we don't miss any document.
- Query 1000 instances sort it and slice to return Top 100 instances.
- Adding API tests.



https://github.com/elastic/kibana/assets/55978943/3c1b746a-799a-4195-8a29-230b2547c53b
WafaaNasr pushed a commit to WafaaNasr/kibana that referenced this issue Feb 5, 2024
closes elastic#167633

- Move sorting to the backend, so we don't miss any document.
- Query 1000 instances sort it and slice to return Top 100 instances.
- Adding API tests.



https://github.com/elastic/kibana/assets/55978943/3c1b746a-799a-4195-8a29-230b2547c53b
WafaaNasr pushed a commit to WafaaNasr/kibana that referenced this issue Feb 6, 2024
closes elastic#167633

- Move sorting to the backend, so we don't miss any document.
- Query 1000 instances sort it and slice to return Top 100 instances.
- Adding API tests.



https://github.com/elastic/kibana/assets/55978943/3c1b746a-799a-4195-8a29-230b2547c53b
CoenWarmer pushed a commit to CoenWarmer/kibana that referenced this issue Feb 15, 2024
closes elastic#167633

- Move sorting to the backend, so we don't miss any document.
- Query 1000 instances sort it and slice to return Top 100 instances.
- Adding API tests.



https://github.com/elastic/kibana/assets/55978943/3c1b746a-799a-4195-8a29-230b2547c53b
CoenWarmer pushed a commit to CoenWarmer/kibana that referenced this issue Feb 15, 2024
closes elastic#167633

- Move sorting to the backend, so we don't miss any document.
- Query 1000 instances sort it and slice to return Top 100 instances.
- Adding API tests.



https://github.com/elastic/kibana/assets/55978943/3c1b746a-799a-4195-8a29-230b2547c53b
fkanout pushed a commit to fkanout/kibana that referenced this issue Mar 4, 2024
closes elastic#167633

- Move sorting to the backend, so we don't miss any document.
- Query 1000 instances sort it and slice to return Top 100 instances.
- Adding API tests.



https://github.com/elastic/kibana/assets/55978943/3c1b746a-799a-4195-8a29-230b2547c53b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apm:service-overview bug Fixes for quality problems that affect the customer experience Team:APM All issues that need APM UI Team support v8.13.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants