-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Infra UI] Limit "group by" choices for Metrics Explorer UI based on metric selection #39613
Comments
Pinging @elastic/infra-logs-ui |
Possibly related to more general "discuss PR" @simianhacker started, but limiting the discussion only to the "group per" selection: #36843 |
@roncohen @exekias correct me if I'm wrong, but I think this work will have the same issues as the general metric field we want to limit, because even once we know which fields the user has selected in the metrics, we won't easily know the full set of possible "group by" fields that would correspond there, right? I wonder if another first iteration approach is to do the best we can and move those fields to the top of the drop down, and then leave the rest below, in a sort of "Suggested Fields" / "All Fields" split… |
That sounds correct @jasonrhodes, but once you have decided on a metric, the fields available for grouping should be pretty stable. Reason for this is that normally metrics always have the same set of labels, just different values on them. Having the rest of fields available somehow could make sense, as you point out, as we may miss some fields with this trick. The only situation I can think of where this could happen is with docker/kubernetes labels. These are free form, so you can expect different set of labels depending on the service being monitored. That said, if you check a good amount of documents in the last couple of minutes you should probably get most of the available fields. |
@exekias what's the status on getting the |
It went in already as experimental, should be in 7.2, more details here: elastic/beats#10293 It needs to be enabled with |
Great, so my thought for an approach here is this:
Does that sound like a sane first approach? |
more or less, just making sure:
when the user (or we, on load) have selected a metric, then we need to do another query to get a sample of documents that have that specific field. We can't use the same sample of docs that we used to determine the "on-load" metric. |
SGTM |
@roncohen yes, that's the first bullet point in the above approach, I think? If I understand correctly. :) The user visits the page and has a list of metrics to choose from (how to make that experience better is handled in another ticket). As they select metrics, we do an "exists" query for those fields to get a sample of docs that have those fields, then use the other fields in those docs to drive the group by dropdown. |
Another solution suggested by @skh: Have a list of fields that are always available to group by (ECS fields we expect in all documents -- do these exist?), then add all other fields that start with the same top level key, e.g. for |
That could be another option, just take into account that ECS has a ton of fields in it, and most of them will have no data. So while the situation would improve a bit, we would still have many fields that make no sense there. I would say the initial proposed solution would provide the right field set in most cases. Perhaps a |
++ on first trying the approach described by Jason here, and having a "show all" button as a fallback. we can evaluate and see. if we notice we are missing too many fields, we can go to the approach Sonja suggested. How does that sound? |
OK. I suggest we make sure to add telemetry to track if the "show all" is ever used |
This should be included in the meta issue that @simianhacker is looking into re: field availability |
I just added a brief summary of the two options we've discussed to this ticket's description. We should choose one and move forward. |
I would do a combination of the two options. If the metric field is prefixed with |
- Closes elastic#41090 - Closes elastic#39613 - Adds allowed list for ECS, Promehteus, Kubernetes, and Docker fields - Filters "graph pre" fields by selected metrics - Only displays allowed fields for metric selection, graph per, and Kquery bar
* [Infra UI] Limit Metric Explorer fields - Closes #41090 - Closes #39613 - Adds allowed list for ECS, Promehteus, Kubernetes, and Docker fields - Filters "graph pre" fields by selected metrics - Only displays allowed fields for metric selection, graph per, and Kquery bar * Fixing test * Changing all caps to camel case * Fixing logic to be more clear and handle null use cases * Changing to singular
* [Infra UI] Limit Metric Explorer fields - Closes elastic#41090 - Closes elastic#39613 - Adds allowed list for ECS, Promehteus, Kubernetes, and Docker fields - Filters "graph pre" fields by selected metrics - Only displays allowed fields for metric selection, graph per, and Kquery bar * Fixing test * Changing all caps to camel case * Fixing logic to be more clear and handle null use cases * Changing to singular
* [Infra UI] Limit Metric Explorer fields - Closes #41090 - Closes #39613 - Adds allowed list for ECS, Promehteus, Kubernetes, and Docker fields - Filters "graph pre" fields by selected metrics - Only displays allowed fields for metric selection, graph per, and Kquery bar * Fixing test * Changing all caps to camel case * Fixing logic to be more clear and handle null use cases * Changing to singular
Describe UX challenge:
In the Metrics Explorer, we auto-populate all available fields in the "group per" control. However, depending on the metric selection, only a small subset of fields will be relevant.
Describe recommended change in experience:
Only populate relevant selections for "group per". For Metricbeat, for instance, these will include fields that are captured for all beats and fields specific to that metricset. However, we likely will need to arrive at determining what fields are relevant dynamically because of how some modules work, and the fact that users have options to enable different processors when the use Metricbeat.
Options:
Both options would have a "show all" escape hatch built in that would allow a user to get the experience that happens today.
Screenshots below show the current behavior we are trying to improve.
The text was updated successfully, but these errors were encountered: