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

[Visualizations] Simplify visualization telemetry #77145

Merged
merged 7 commits into from
Sep 14, 2020

Conversation

sulemanof
Copy link
Contributor

@sulemanof sulemanof commented Sep 10, 2020

Summary

Resolves #56986

  • created a visualizations usage collector in visualizations plugin;
  • added unit tests;
  • removed oss_telemetry plugin;

Checklist

Delete any items that are not applicable to this PR.

For maintainers

@sulemanof
Copy link
Contributor Author

@elasticmachine merge upstream

@sulemanof sulemanof marked this pull request as ready for review September 10, 2020 14:54
@sulemanof sulemanof requested a review from a team as a code owner September 10, 2020 14:54
@sulemanof sulemanof added Feature:Visualizations Generic visualization features (in case no more specific feature label is available) release_note:skip Skip the PR/issue when compiling release notes v7.10.0 v8.0.0 Feature:Telemetry Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Sep 10, 2020
@elasticmachine
Copy link
Contributor

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

@sulemanof
Copy link
Contributor Author

@elasticmachine merge upstream

Copy link
Member

@ppisljar ppisljar left a comment

Choose a reason for hiding this comment

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

code LGTM

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.

Code LGTM! I have tested it on Safari:

  1. Remove all tasks on DevTools:
    POST /.kibana_task_manager/_delete_by_query { "query": { "match_all": {} } }

  2. Made a change to a server file in kibana

  3. Went to Management-->Advanced Setting->Telemetry-->See an example of what we collect and check the vis data

Can't see any regressions. 🙂

@flash1293 can you also check it? 🙏

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Build metrics

distributable file count

id value diff baseline
default 45516 -9 45525
oss 27221 +3 27218
total -6

History

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

Copy link
Contributor

@flash1293 flash1293 left a comment

Choose a reason for hiding this comment

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

Tested with multiple spaces and works as expected, LGTM

@sulemanof sulemanof merged commit 44f594e into elastic:master Sep 14, 2020
@sulemanof sulemanof deleted the feat/visualizations_telemetry branch September 14, 2020 10:36
sulemanof added a commit that referenced this pull request Sep 14, 2020
* Move visualizations telemetry into visualizations plugin

* Remove x-pack oss_telemetry plugin

* Add unit tests

* Update docs

* Revert not related changes

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
# Conflicts:
#	x-pack/plugins/oss_telemetry/server/test_utils/index.ts
};
const esResponse: ESResponse = await callCluster('search', searchParams);
const size = get(esResponse, 'hits.hits.length');
if (size < 1) {
Copy link
Member

Choose a reason for hiding this comment

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

@sulemanof I've noticed this error ever since this PR has been merged (for fresh installed clusters):

server    log   [10:30:55.212] [warning][collector-set][plugins][usageCollection] TypeError: Cannot read property 'hits' of undefined
    at getStats (/src/plugins/visualizations/server/usage_collector/get_usage_collector.ts:64:54)
    at process._tickCallback (internal/process/next_tick.js:68:7)
server    log   [10:30:55.216] [warning][collector-set][plugins][usageCollection] Unable to fetch data from visualization_types collector

The reason: size is undefined and undefined < 1 is false.

Copy link
Member

Choose a reason for hiding this comment

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

I've created #77478 to tackle this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Telemetry Feature:Visualizations Generic visualization features (in case no more specific feature label is available) release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.10.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Simplify visualization telemetry
7 participants