elastic / kibana

Your window into the Elastic Stack
https://www.elastic.co/products/kibana
Other
19.71k stars 8.12k forks source link

[Lens] Create curated suggested visualisations based on index pattern #100642

Open shahzad31 opened 3 years ago

shahzad31 commented 3 years ago

Lens in empty view suggests that Drop Fields here to start

We should help beginner users with more curated visualisations templates in empty view.

For example if user selected synthetics index patterns, in that case we can have some sort of cards/pills views in the empty state, to highlighted curated visualizations.

We can suggest create Up/Down monitor histogram, visualize monitor duration over time.

Same goes for Rum index pattern, we can suggest user to visualizae web core vitals, performance distributions.

We can leverage index pattern fields meta data, or we can also ask respective apps in observability to register those templates with lens.

Uptime app can register those pre built templates with lens regarding up/down ping histogram.

APM/UX app can register templates regarding apm/rum data.

elasticmachine commented 3 years ago

Pinging @elastic/kibana-app (Team:KibanaApp)

flash1293 commented 3 years ago

As discussed offline: I think I'm a fan of exposing APIs so solutions can register their black box suggestion helpers - it shifts the burden of domain knowledge to the place which needs to deal with it already, keeping Lens as general purpose as possible.

I'm imagining an API like this:

type Contract = {
  datasources: {
    indexpattern: {
      registerSuggestionHelper: (helper: IndexPatternSuggestionHelper) => void;
    }
  }
};

interface IndexPatternSuggestionHelper {
  id: string;
  getPreferredOperation(indexPattern: IndexPattern, field: IndexPatternField) => undefined | { operationType: OperationType; title: string };
}

Index pattern datasource will call getPreferredOperation from each helper on each field and use the returned result if available instead of the default choices today (top values, median, date histogram)

drewpost commented 3 years ago

It's a workflow we want to have in the Exploratory view as well so perhaps it can benefit both places.

ruflin commented 10 months ago

Part of this is that solutions can register helpers, but I think we can also be more opinionated around the data stream naming scheme index patterns. If Lens is opened for metrics-*-* we know these users are interested in metrics and eventually will only have TSDS data streams. For logs-*-*, we can focus on logs use cases as the default.

crespocarlos commented 9 months ago

Just came across this ticket, I'd like to share some thoughts on the topic because it's one UX improvement we see in infra.

Uptime app can register those pre built templates with lens regarding up/down ping histogram. APM/UX app can register templates regarding apm/rum data.

In the same way integration packages register dashboards and some other assets, one idea is to introduce a new saved object type that would store these built-in metrics/templates. So teams responsible for those packages could contribute to more formulas, as well as the community.

In fact, I was brainstorming some ideas and put together some thoughts on a doc: https://docs.google.com/document/d/1JCjIHh4mkXE7Q46iiUolodkvbwCNXlisGlSOUOsZKYQ