-
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
Log deprecations originating from Kibana on debug level #123660
Conversation
loggers: [ | ||
{ | ||
name: 'root', | ||
level: 'error', |
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.
before jest integration tests wouldn't log anything to the console, but having at least error
logs is useful for failing/flaky tests
c2a4f99
to
462e093
Compare
Pinging @elastic/kibana-core (Team:Core) |
if (requestOrigin === 'kibana') { | ||
deprecationLogger.info(deprecationMsg); | ||
deprecationLogger.debug(deprecationMsg); | ||
} else { | ||
deprecationLogger.debug(deprecationMsg); | ||
} |
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: given that's now the same level, should we just remove this if/else block?
deprecation: { type: 'console', layout: { type: 'json' } }, | ||
console: { type: 'console', layout: { type: 'pattern' } }, |
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.
Isn't it going to be an issue to have both json
and pattern
messages output on stdout?
💚 Build Succeeded
Metrics [docs]
History
To update your PR or re-run it, just comment with: |
💔 All backports failed
How to fixRe-run the backport manually:
Questions ?Please refer to the Backport tool documentation |
* Log deprecations originating from Kibana on debug level * Surface debug level deprecation logs on CI * Review feedback (cherry picked from commit c64c766)
* Log deprecations originating from Kibana on debug level * Surface debug level deprecation logs on CI * Review feedback (cherry picked from commit c64c766)
Summary
In #120044 Kibana started logging when Elasticsearch requests returned the deprecation header. For requests with the
x-elastic-product-origin: kibana
header we logged on the info level. Since our thinking was to remove all usages of deprecated API's this wouldn't produce a lot of log volume.However, most teams didn't remove usage of deprecated API's and some deprecation logs cannot be avoided such as elastic/elasticsearch#81589 elastic/elasticsearch#81480 elastic/elasticsearch#81345
So to avoid confusion and a lot of log noise for our users it's better to log these messages on the debug level.
Risks
The only change to non-test code is a single line to change the log level 98c7892 so the risk of this affecting users is very small.
We could however risk that deprecations are no longer correctly showing up in CI runs. To mitigate this I'll verify the amount of surfaced deprecation logs with this PR against previous 7.17 builds.
For maintainers