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

[Telemetry] Track usage of the new Statistics in legend #183887

Closed
teresaalvarezsoler opened this issue May 21, 2024 · 2 comments · Fixed by #182357
Closed

[Telemetry] Track usage of the new Statistics in legend #183887

teresaalvarezsoler opened this issue May 21, 2024 · 2 comments · Fixed by #182357
Assignees
Labels
Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@teresaalvarezsoler
Copy link

teresaalvarezsoler commented May 21, 2024

Context
We are adding the ability to include statistics in the chart legend #176583 and we should be able to track its usage by including it as part of our UI counters for Lens visualizations.

Requirements
Define the following events (they will apply for both Lens and ES|QL charts):

  • render_lens_legend_stats - triggered every time a Lens chart that contains stats in legends is rendered.
  • lens_legend_stats- triggered if the user adds any stats in the legend when a chart is saved (it will also be triggered everytime the stats are edited in the future for the same viz)
  • lens_legend_stats_${TYPE} - triggered for specific types, if user has 2 statistics (eg. AVG and MIN) two events are triggered on save.
  • lens_legend_stats_amount_1 - triggered on save when there is only 1 stat selected for the legend
  • lens_legend_stats_amount_2- triggered on save when there are 2 stats selected for the legend
  • lens_legend_stats_amount_3 - triggered on save when there are 3 stats selected for the legend
  • lens_legend_stats_amount_4_7- triggered on save when there are between 4 and 7 stats selected for the legend
  • lens_legend_stats_amount_above_8 - triggered on save when there are >=8 stats selected for the legend
@teresaalvarezsoler teresaalvarezsoler added the Team:Visualizations Visualization editors, elastic-charts and infrastructure label May 21, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-visualizations (Team:Visualizations)

@mbondyra
Copy link
Contributor

mbondyra commented May 28, 2024

Events we decided on:

lens_legend_stats- triggered if any stats is in legend

lens_legend_stats_${TYPE} - triggered for specific types, if user has 2 statistics (eg. AVG and MIN) two events are triggered.

and counting how many they use
lens_legend_stats_amount_1
lens_legend_stats_amount_2
lens_legend_stats_amount_3
lens_legend_stats_amount_4_7
lens_legend_stats_amount_above_8

@mbondyra mbondyra changed the title [Telemtry] Track usage of the new Statistics in legend [Telemetry] Track usage of the new Statistics in legend May 28, 2024
@mbondyra mbondyra self-assigned this May 28, 2024
mbondyra added a commit that referenced this issue Jun 19, 2024
## Summary

Fixes #183887

<img width="959" alt="Screenshot 2024-06-09 at 21 11 33"
src="https://github.com/elastic/kibana/assets/4283304/950a92cb-a70a-4413-9358-f4a8a5b7da5d">


<img width="513" alt="Screenshot 2024-06-09 at 21 11 38"
src="https://github.com/elastic/kibana/assets/4283304/36d8fe9d-fa40-4721-ac24-db0599076b9c">

- [x] popover width = 500 px
- [x] new combobox legend values component added
- [x] switch show value removed
- [x] location and alignment is in a single for row
- [x] auto legend width option to allow users to have the legend
automatically size based its contents - not there yet
- [x] no limit imposed of the number of values  
- [x] when a value is selected, list or table appears
- [x] when the list is selected, label truncations is not offered and
legend items should be forced to have truncation on and clamped to a
single line.
- [x] adds telemetry too - adds events on save if the legend statistics
change:

`lens_legend_stats`- triggered if any stats is in legend

`lens_legend_stats_${TYPE}` - triggered for specific types, if user has
2 statistics (eg. AVG and MIN) two events are triggered.

and counting how many they use
`lens_legend_stats_amount_1`
`lens_legend_stats_amount_2`
`lens_legend_stats_amount_3`
`lens_legend_stats_amount_4_7`
`lens_legend_stats_amount_above_8`

---------

Co-authored-by: Nick Partridge <[email protected]>
Co-authored-by: Marco Vettorello <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants