Skip to content

Conversation

@alexwizp
Copy link
Contributor

@alexwizp alexwizp commented Sep 25, 2020

Closes: #78269

Summary

Create a new collector (vis_type_vega) to the vega plugin

This collector collects the following data:

  • "vega_lib_specs_total" - number of saved vega visualizations using the vega schema (see https://vega.github.io/vega/)
  • "vega_lite_lib_specs_total" - number of saved vega visualizations using the vega-lite schema (see https://vega.github.io/vega-lite/)
  • "vega_use_map_total" - number of vega visualizations using the map layout

Screens

image

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@alexwizp alexwizp self-assigned this Sep 26, 2020
@alexwizp alexwizp added v7.10.0 v8.0.0 Feature:Vega Vega visualizations Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// release_note:skip Skip the PR/issue when compiling release notes Feature:Telemetry labels Sep 26, 2020
@alexwizp
Copy link
Contributor Author

@elasticmachine merge upstream

@alexwizp alexwizp marked this pull request as ready for review September 28, 2020 08:35
@alexwizp alexwizp requested a review from a team September 28, 2020 08:35
@elasticmachine
Copy link
Contributor

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

@stratoula
Copy link
Contributor

@alexwizp code is LGTM and it works correctly but we would also like to exclude the vega sample data visualizations from the stats in order to have more accurate results.

Copy link
Contributor

@sulemanof sulemanof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall LGTM, checked locally and works as expected, left comments.
The only concern is about using the hardcoded list of sample dataset excludedFromStatsVisualizations.
Could you please check if we could get this list from the home plugin contract? It seems it's possible both from setup & start as home.sampleData.getSampleDatasets()

@alexwizp
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Contributor

@sulemanof sulemanof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, checked out locally, works well


const getDefaultVegaVisualizations = (home: UsageCollectorDependencies['home']) => {
const titles: string[] = [];
const sampleDataSets = home?.sampleData.getSampleDatasets() ?? [];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Copy link
Contributor

@stratoula stratoula left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, tested locally 👏

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

distributable file count

id value diff baseline
default 45826 +4 45822
oss 26569 +4 26565

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@alexwizp alexwizp merged commit 65cafcd into elastic:master Sep 29, 2020
alexwizp added a commit to alexwizp/kibana that referenced this pull request Sep 29, 2020
* telemetry

* [Vega] Add vega maps statistics to usage collector

Closes: elastic#78269

* add tests

* ignore sample data visualizations

* fix PR comment

* get default vega vis from home plugin

* match_phrase doesn't work for full text search

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
alexwizp added a commit that referenced this pull request Sep 29, 2020
* telemetry

* [Vega] Add vega maps statistics to usage collector

Closes: #78269

* add tests

* ignore sample data visualizations

* fix PR comment

* get default vega vis from home plugin

* match_phrase doesn't work for full text search

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature:Telemetry Feature:Vega Vega visualizations release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v7.10.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Vega] Add vega maps statistics to usage collector

6 participants