-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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] fix bug where uiStatsMetrics is not getting reported #54045
Conversation
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
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.
I reviewed the code and ran this locally with and without the fix.
With this PR, we get the uiStatsMetrics reported and I was able to log out the contents:
In route handler for reporting ui_metrics, report.uiStatsMetrics { 'Kibana_home-loaded-welcomeScreenMount':
{ key: 'Kibana_home-loaded-welcomeScreenMount',
appName: 'Kibana_home',
eventName: 'welcomeScreenMount',
type: 'loaded',
stats: { min: 0, max: 1, avg: 0.5, sum: 1 } },
'Kibana_home-click-sampleDataConfirm':
{ key: 'Kibana_home-click-sampleDataConfirm',
appName: 'Kibana_home',
eventName: 'sampleDataConfirm',
type: 'click',
stats: { min: 0, max: 1, avg: 0.5, sum: 1 } },
'visualize-click-lens':
{ key: 'visualize-click-lens',
appName: 'visualize',
eventName: 'lens',
type: 'click',
stats: { min: 0, max: 1, avg: 0.5, sum: 1 } } }
--> report.uiStatsMetrics { 'Kibana_home-loaded-welcomeScreenMount':
{ key: 'Kibana_home-loaded-welcomeScreenMount',
appName: 'Kibana_home',
eventName: 'welcomeScreenMount',
type: 'loaded',
stats: { min: 0, max: 1, avg: 0.5, sum: 1 } },
'Kibana_home-click-sampleDataConfirm':
{ key: 'Kibana_home-click-sampleDataConfirm',
appName: 'Kibana_home',
eventName: 'sampleDataConfirm',
type: 'click',
stats: { min: 0, max: 1, avg: 0.5, sum: 1 } },
'visualize-click-lens':
{ key: 'visualize-click-lens',
appName: 'visualize',
eventName: 'lens',
type: 'click',
stats: { min: 0, max: 1, avg: 0.5, sum: 1 } } }
Without the fix (or without running yarn-kbn-bootstrap
, report.uiStatsMetrics
is undefined
…tic#54045) * fix bug where uiStatsMetrics is not getting reported * fix tests
Summary
On kibana
7.6
and8.0
UI metrics currently does not report theuiStatsMetrics
part of the ui metrics report. This is happening due to wrapping the code in an if statement that always resolves tofalse
.Our test cases dont catch this since we mimic the report object instead of generating it directly from
reportManager.assignReports
as we do in production.This PR fixes the bug and the tests to catch any similar cases in the future.
Reference: #52893