-
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 Metric Explorer fields #43322
[Infra UI] Limit Metric Explorer fields #43322
Conversation
- 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
Pinging @elastic/infra-logs-ui |
💚 Build Succeeded |
💚 Build Succeeded |
💚 Build Succeeded |
💚 Build Succeeded |
💚 Build Succeeded |
💚 Build Succeeded |
retest |
💔 Build Failed |
💚 Build Succeeded |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Checked out the PR. The metrics search field as well as group-by show fewer metrics. Some fields are still empty, but as @simianhacker mentioned, this can be properly fixed in Metricbeat. LGTM.
retest |
💔 Build Failed |
Please merge master |
💚 Build Succeeded |
@simianhacker Haven't played with it yet, one question: Even if a field is not shown but I know it's exact name, can I still filter on it by manually typing it in? If that is the case, +1 on moving forward with this and trying it out. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. A few tiny changes.
x-pack/legacy/plugins/infra/server/lib/adapters/fields/framework_fields_adapter.ts
Outdated
Show resolved
Hide resolved
💚 Build Succeeded |
💚 Build Succeeded |
@phillipb This is ready for another review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* [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
hey @simianhacker. Thanks for getting this rolling. I see that we still show I imagine these are only relevant if you have selected cardinality? I suggest we get rid of the cardinality option and with that, also get rid of any non numeric fields, i.e. only show long/int/float/double fields |
@roncohen We should filter out the string fields for the metric style aggregations. I don't think we should get rid of |
Summary
This PR adds an attribute (
displayable
) to the list of fields returned by the source status GraphQL endpoint. This value is set totrue
under the following conditions:ECS_ALLOWED_LIST
event.dataset
PROMETHEUS_ALLOWED_LIST
) only if theevent.modules
aggregation also includes one of the special prefixes (likeprometheus
)The
displayable
attribute is used to filter the fields displayed in the Metrics Explorer. For thegraph per
field list, the list is filtered by the prefix of any selected metrics. Along with the other matching prefixes it also displays any ECS fields or matching "special" fields.Related Issues
Meta Issue #40277
Closes #41090
Closes #39613
Caveats
There will still be a lot of fields that are empty OR are missing data but that list should now be significantly smaller. To really fix this problem we need Metricbeat and Filebeat to stop shipping FAT mappings that include every possible field. Instead they should only be setting mappings with only the fields they actually ship. Once that happens, this solution will work even better.
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.This was checked for cross-browser compatibility, including a check against IE11Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n supportDocumentation was added for features that require explanation or tutorialsThis was checked for keyboard-only and screenreader accessibility