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

[Lens] Bake lens ui metric type into @kbn/analytics #48352

Closed
Bamieh opened this issue Oct 16, 2019 · 8 comments · Fixed by #135684
Closed

[Lens] Bake lens ui metric type into @kbn/analytics #48352

Bamieh opened this issue Oct 16, 2019 · 8 comments · Fixed by #135684
Labels
Feature:Lens Feature:Telemetry Team:Visualizations Visualization editors, elastic-charts and infrastructure technical debt Improvement of the software architecture and operational architecture

Comments

@Bamieh
Copy link
Member

Bamieh commented Oct 16, 2019

Introduce Lens metric collector into @kbn/analytics and ui_metric.

Currently lens ui collection logic almost duplicates @kbn/analytics logic providing a new collection method. This UI metric can be easily baked into the @kbn/analytics common library by introducing it as a new METRIC_TYPE. Doing so it makes it easier to manage telemetry, refactor code and have others utilize these metric types.

It is also not ideal to have scattered code across kibana for each newly introduced metric. UI metrics currently only have 3 metric types; there are many interesting and important metrics we can introduce to it as features. Implementing these metrics across different plugins will only make planning and development for telemetry harder.

Context: #47919

@wylieconlon wylieconlon added the Team:Visualizations Visualization editors, elastic-charts and infrastructure label Oct 18, 2019
@elasticmachine
Copy link
Contributor

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

@flash1293 flash1293 added the technical debt Improvement of the software architecture and operational architecture label Aug 10, 2020
@flash1293
Copy link
Contributor

Once we do this, we can also use the provided utility components (https://github.com/elastic/kibana/blob/master/src/plugins/kibana_usage_collection/server/collectors/application_usage/README.md#tracking-sub-views-inside-your-application) to track how long the users spends in which menu

@Bamieh
Copy link
Member Author

Bamieh commented Jun 24, 2021

I've briefly discussed the status of ui counters with @flash1293 today;

  1. UI Counters data cannot be ingested on the telemetry cluster at the moment. We're waiting until telemetry-next is in production (hopefully by 7.15 GA). All reported data prior to that date will be consumable on telemetry-next however.

  2. We've deprecated ui_metrics in favor of UI Counters. The way we reported ui_metrics proved to be almost useless. We've kept the same apis and metric types (exposed by @kbn/analytics) but changed how we are collecting and reporting the data:

UI Counters provides more data about the events and it aggregates the data each day rather than a raw total. This allows us to slice and dice the data in meaningful ways across time and releases.

"ui_counters" : {
  "dailyEvents" : [
    {
      "eventName" : "dashboard:query_submitted",
      "total" : 8,
      "lastUpdatedAt" : "2021-06-01T15:16:57.621Z",
      "counterType" : "click",
      "appName" : "data_plugin",
      "fromTimestamp" : "2021-06-01T00:00:00Z"
    },
    {
      "eventName" : "unhandled_error",
      "total" : 1,
      "lastUpdatedAt" : "2021-06-01T14:46:08.783Z",
      "counterType" : "count",
      "appName" : "global_search_bar",
      "fromTimestamp" : "2021-06-01T00:00:00Z"
    },
    {
      "eventName" : "7.11.0",
      "total" : 2208,
      "lastUpdatedAt" : "2021-06-01T15:39:22.610Z",
      "counterType" : "loaded",
      "appName" : "DashboardPanelVersionInUrl",
      "fromTimestamp" : "2021-06-01T00:00:00Z"
    },
    {
      "eventName" : "unhandled_error",
      "total" : 8,
      "lastUpdatedAt" : "2021-06-03T12:26:48.329Z",
      "counterType" : "count",
      "appName" : "global_search_bar",
      "fromTimestamp" : "2021-06-03T00:00:00Z"
    }
  ]
}

@ghudgins
Copy link
Contributor

ghudgins commented Aug 3, 2021

re-visiting this ~november 2021

@afharo
Copy link
Member

afharo commented Jul 7, 2022

Just dropping a comment to highlight that UI Counters are fully usable in production, and automatically indexed, so there's no need to update mappings as more events are added 😇

@flash1293
Copy link
Contributor

Thanks for the note @afharo ! We are migrating away from the custom lens ui to ui counters right now.

@Bamieh
Copy link
Member Author

Bamieh commented Jul 10, 2022

@flash1293 please let us know if you find anything missing in the telemetry dev guide so we can fill in the gaps :) I am excited to see the reduction in the surface area of telemetry on the browser after this migration! thank you

@afharo
Copy link
Member

afharo commented Jul 22, 2022

#135684 will resolve this issue 🧡

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Lens Feature:Telemetry Team:Visualizations Visualization editors, elastic-charts and infrastructure technical debt Improvement of the software architecture and operational architecture
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants