-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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 for Visualizations by type #28793
Telemetry for Visualizations by type #28793
Conversation
d98e8b9
to
126d065
Compare
126d065
to
c64cba9
Compare
💚 Build Succeeded |
Pinging @elastic/kibana-app |
CI is green, and looking to get 1 more review |
* has to wait for all plugins to initialize first. | ||
* It's fine to ignore it as next time around it will be initialized (or it will throw a different type of error) | ||
*/ | ||
if (errMessage.indexOf('NotInitialized') >= 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
errMessage.includes('NotInitialized')
might read a bit better here (might also be sub-ms faster as well?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also might want a test for this since it's interesting behavior (not sure how difficult that is)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one case that I think would be good to test
* has to wait for all plugins to initialize first. | ||
* It's fine to ignore it as next time around it will be initialized (or it will throw a different type of error) | ||
*/ | ||
if (errMessage.indexOf('NotInitialized') >= 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also might want a test for this since it's interesting behavior (not sure how difficult that is)
💚 Build Succeeded |
* task runner and usage collector for visualizations by type * type is always just "visualization" * drop the I- prefix for interfaces * bug fixes * ts fix * comment perfection * just usage. * const for task numworkers * use mapValues * get next midnight module * move to oss_telemtry * test fix * errMessage.includes(NotInitialized)
6.x/6.7: #29625 |
Just want to say how excited I am about this one, huge thank you 🙇 to everyone who had a hand in this. This PR is amazing! |
* task runner and usage collector for visualizations by type * type is always just "visualization" * drop the I- prefix for interfaces * bug fixes * ts fix * comment perfection * just usage. * const for task numworkers * use mapValues * get next midnight module * move to oss_telemtry * test fix * errMessage.includes(NotInitialized)
any idea why TSVB is not in this telemetry pr? I know @tsullivan worked on it and it was supposed to be included |
@AlonaNadler In the codebase, TSVB currently lives inside a legacy plugin called I haven't looked closely at this PR, but based on Tim's summary above it looks like the API response includes data for |
Thanks @lukeelmers that is very helpful !
|
@AlonaNadler I have not yet confirmed
|
Closing #22010
Summary
This PR adds a
visualization_types
property to Kibana usage stats.Parts of the solution
Nightly Task to parse visState JSON
This schedules a nightly task to parse the
visState
JSON strings from every visualization saved object in the.kibana
index. Therefore, it depends on thex-pack/task_manager
plugin, which I believe makes it suitable for creating as a new X-Pack plugin that can haveelasticsearch
,xpack_main
andtask_manager
as dependencies.At first, the task is scheduled to run immediately, and from that point, it runs nightly at midnight local server time.
Collector to return the parsed / summarized stats
The actual usage collector gets the scheduled task by
_id
, finds thestate
data that contains the stats and simply returns it.Screenshot of API response
Explanation: Looking at the
area
stats, my default space has 10 area charts and my custom space has 1 area chart. Hence,min
,max
andavg
are anonymized breakdowns of how that visualization type is distributed across spaces.Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.This was checked for cross-browser compatibility, including a check against IE11Any text added follows EUI's writing guidelines, uses sentence case text and includes i18n supportDocumentation was added for features that require explanation or tutorialsThis was checked for keyboard-only and screenreader accessibility