-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Enable deprecation log indexing by default #76292
Comments
Pinging @elastic/es-core-infra (Team:Core/Infra) |
Thanks @alisonelizabeth - we discussed this one in the core/infra sync and we had a a few concerns with enabling this by default:
Would it be better for this to be enabled/disabled on demand? Could we make this easier and allow the user to turn on deprecation log indexing directly from the Upgrade Assistant so at the point they are starting to consider the upgrade they can start indexing the deprecation logs? |
Deprecation logs are throttled by
when the same user (or when no However, the throttling is based on elasticsearch/server/src/main/java/org/elasticsearch/common/logging/RateLimitingFilter.java Line 63 in a92a647
The same throttling logic is applied to both JSON logs and indexed logs.
We could also fix the problem of empty cache after restart by prepopulating it with keys from the index. Ideally I think we should aim to have the size of the index limited by number of deprecations we have in our code base multiplied by numer of x-opaque-id used (however here I guess some throttling should be still needed as number of users is hard to predict) I also like the idea of having deprecation logs indexed by default, as this would allow us to collect all the deprecations triggered by a user and making him aware of all the changes that he has to fix before upgrading. Enabling this on demand, makes it possible that we would miss some of them. cc: @pugnascotia |
Thanks @rdnm for looking into this!
That is a valid question, and not something I had considered. As the upgrade flow currently exists, I would tend to agree that this would likely be more relevant now (7.15/7.16) than 8.1. I'm wondering though if the make-it-minor effort changes this at all?
That is currently how it is functioning - users can enable the setting via the Upgrade Assistant. The issue, as @pgomulka pointed out, is that it's a little difficult to guide users on how long they should wait after turning the setting on to feel comfortable that any deprecated features they are using have been discovered.
++ |
I believe that with the Make It Minor effort, having these logs available by default will become even more important as we won't have the normal end-of-major cycle and will be expecting that users will be able to upgrade more often. I don't have much insight into the additional resources this would require (especially for smaller clusters), but like the thinking surrounding how we can minimize the noise, still keep these messages useful, and allow them to be enabled out of the box. |
we discussed this on core infra syncs on 11th and 18th August If necessary in the future, we can increase the size of a cache (currently 128) prepopulate it with the content the deprecation index. |
@rdnm do you remember if we agreed to do this in 7.x or in 8.0 only? |
I believe the request would be to do this in 7.x too, so we have this information ahead of the 8.0 upgrade. Would that classify as a breaking change? |
Introduces a setting cluster.deprecation_indexing.x_opaque_id_used.enabled to disable use of x-opaque-id in RateLimitingFilter. This will be used for deprecation logs indexing and will not affect logging to files (it uses different instance of RateLimitingFilter with this flag enabled by default) Changes the indices backing a deprecation log data stream to be hidden. Refactors DeprecationHttpIT to be more reliable relates elastic#76292 closes elastic#77936
Introduces a setting cluster.deprecation_indexing.x_opaque_id_used.enabled to disable use of x-opaque-id in RateLimitingFilter. This will be used for deprecation logs indexing and will not affect logging to files (it uses different instance of RateLimitingFilter with this flag enabled by default) Changes the indices backing a deprecation log data stream to be hidden. Refactors DeprecationHttpIT to be more reliable relates #76292 closes #77936
) Introduces a setting cluster.deprecation_indexing.x_opaque_id_used.enabled to disable use of x-opaque-id in RateLimitingFilter. This will be used for deprecation logs indexing and will not affect logging to files (it uses different instance of RateLimitingFilter with this flag enabled by default) Changes the indices backing a deprecation log data stream to be hidden. Refactors DeprecationHttpIT to be more reliable relates elastic#76292 closes elastic#77936
…78982) Introduces a setting cluster.deprecation_indexing.x_opaque_id_used.enabled to disable use of x-opaque-id in RateLimitingFilter. This will be used for deprecation logs indexing and will not affect logging to files (it uses different instance of RateLimitingFilter with this flag enabled by default) Changes the indices backing a deprecation log data stream to be hidden. Refactors DeprecationHttpIT to be more reliable relates #76292 closes #77936 backport #78911
Changing the default for deprecation log indexing to be true. This commit also overrides this defualt to tests where a deprecation data stream would intefere - because it uses index template, it would not be possible to delete with _index_template/*. The overrides should be removed when elastic#78850 is done. closes elastic#76292
Changing the default for deprecation log indexing to be true. This commit also overrides this default to tests where a deprecation data stream would interfere - because it uses index template, it would not be possible to delete with _index_template/*. The overrides should be removed when #78850 is done. closes #76292
Changing the default for deprecation log indexing to be true. This commit also overrides this default to tests where a deprecation data stream would interfere - because it uses index template, it would not be possible to delete with _index_template/*. The overrides should be removed when elastic#78850 is done. closes elastic#76292
…9035) Changing the default for deprecation log indexing to be true. This commit also overrides this default to tests where a deprecation data stream would interfere - because it uses index template, it would not be possible to delete with _index_template/*. The overrides should be removed when #78850 is done. closes #76292 backport #78991
In #61484, Elasticsearch introduced a new setting called
cluster.deprecation_indexing.enabled
to write deprecation logs to a dedicated data stream.This is currently disabled by default. I'd like to propose enabling it by default.
This setting allows users to view and analyze their deprecation logs through the Logs UI or Discover via the Upgrade Assistant in Kibana. If this setting is enabled by default, it will likely be easier for users to spot deprecation issues that need to be addressed immediately rather than having to first enable it, wait a certain period of time to trigger any potential deprecations, and then analyze.
/cc @jakelandis @elasticdog @beiske
The text was updated successfully, but these errors were encountered: