-
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
Browser-side analytics services: use core logger #184520
Browser-side analytics services: use core logger #184520
Conversation
/ci |
/ci |
/ci |
/ci |
Pinging @elastic/kibana-core (Team:Core) |
const report = createUiCounterMetric({ type, appName, eventName, count }); | ||
this.log(report); | ||
this.logger.debug(JSON.stringify(report)); |
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.
NIT we can wrap this one under isLevelEnabled
, to avoid JSON.stringify()
cost when not needed.
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.
Good call 👍
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.
Nice cleanup! 1 NIT
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Module Count
Page load bundle
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: |
Summary
When we implemented the browser-side analytics service, browser-side logger wasn't a thing yet, so we had to implement a custom one. This PR addresses that, by now properly using core's logger.
Direct upside is that those messages:
kibana/packages/analytics/client/src/analytics_client/analytics_client.ts
Lines 136 to 138 in 1c1e20a
using the
debug
level will now be silent by default, unless the developer explicitly setslogging.browser.root.level
toINFO
or superior.