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

[logging] Add deprecation for the default pattern layout. #115316

Closed
wants to merge 5 commits into from

Conversation

lukeelmers
Copy link
Member

@lukeelmers lukeelmers commented Oct 18, 2021

Part of #114968

As outlined in #114968, we plan to change Kibana's default logging format to use the JSON (ECS) layout.

To make this transition as smooth as possible for the small number of users who have opted in to the new logging system in 7.x, this PR adds a deprecation warning that is surfaced in the upgrade assistant. (PR going directly into 7.x, as I'd be removing it from 8.0 in the follow-up anyway).

The warning is shown to anyone who has explicitly configured the default root console appender. The warning won't show to someone who has configured their own appender called console (which would overwrite the default one), as they would have already explicitly set a specific layout in their config.

As a follow-up, we will make some improvements to the documentation in order to explain the upgrade path more clearly. For now, this focuses on introducing the deprecation itself.

Note that I'm not adding an actual deprecation docs entry for the release notes because we aren't deprecating the pattern layout, we are just switching a default, and I don't want to cause any confusion.

Screen Shot 2021-10-18 at 9 11 23 PM

@lukeelmers lukeelmers added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting Feature:Logging v7.16.0 buildkite-ci labels Oct 18, 2021
@lukeelmers lukeelmers self-assigned this Oct 18, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@lukeelmers
Copy link
Member Author

@elasticmachine merge upstream

addDeprecation({
configPath: 'logging.root.appenders',
level: 'warning',
documentationUrl: `https://github.com/elastic/kibana/blob/${branch}/src/core/server/logging/README.mdx#configuration`,
Copy link
Member Author

Choose a reason for hiding this comment

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

I'll open a follow-up PR to improve our documentation and can adjust this link at that time. Just wanted to get this PR up first so that we can get it in before FF.

src/core/server/config/deprecation/core_deprecations.ts Outdated Show resolved Hide resolved
Comment on lines +622 to +627
i18n.translate('core.deprecations.loggingPatternLayoutDefault.manualSteps1', {
defaultMessage: `[recommended] Update your log ingestion configuration to use ECS format.`,
}),
i18n.translate('core.deprecations.loggingPatternLayoutDefault.manualSteps2', {
defaultMessage: `Alternatively, you can preserve the existing format by configuring a custom appender with \`layout.type: 'pattern'\``,
}),
Copy link
Member Author

Choose a reason for hiding this comment

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

I struggled with how to phrase these; any feedback is welcomed.

@lukeelmers
Copy link
Member Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky

Metrics [docs]

✅ unchanged

History

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

cc @lukeelmers

@lukeelmers
Copy link
Member Author

Closing as discussed in #114968 (comment)

@lukeelmers lukeelmers closed this Oct 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting buildkite-ci Feature:Logging release_note:skip Skip the PR/issue when compiling release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v7.16.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants