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

Enable deprecation log indexing by default #78319

Closed

Conversation

pgomulka
Copy link
Contributor

@pgomulka pgomulka commented Sep 27, 2021

Deprecation logs indexing is enabled by default. As before XOpaqueId is used for logs throttling, but it can be turned off and be ignored which can be useful for smaller clusters.

closes #76292
closes #77936

@pgomulka pgomulka added :Core/Infra/Logging Log management and logging utilities v8.0.0 v7.16.0 labels Sep 27, 2021
@pgomulka pgomulka self-assigned this Sep 27, 2021
@elasticmachine elasticmachine added the Team:Core/Infra Meta label for core/infra team label Sep 27, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@pgomulka pgomulka marked this pull request as draft September 27, 2021 13:11
@@ -234,6 +234,17 @@ The user ID is included in the `X-Opaque-ID` field in deprecation JSON logs.
---------------------------
// NOTCONSOLE

Deprecation logs are indexed into `.logs-deprecation.elasticsearch-default` data stream by default.
You can disable deprecation log indexing by changing a
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
You can disable deprecation log indexing by changing a
You can disable deprecation log indexing by changing the


==== Deprecation logs throttling
Deprecation logs are deduplicated based on a deprecated feature key
and x-opaque-id so that if a feature is repeatedly used, it will not overload the deprecation logs.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we link x-opaque-id to a description somewhere?

@@ -782,7 +782,7 @@ protected static void wipeAllIndices() throws IOException {
boolean includeHidden = minimumNodeVersion().onOrAfter(Version.V_7_7_0);
try {
//remove all indices except ilm history which can pop up after deleting all data streams but shouldn't interfere
final Request deleteRequest = new Request("DELETE", "*,-.ds-ilm-history-*");
final Request deleteRequest = new Request("DELETE", "*,-.ds-ilm-history-*,-.ds-.logs-deprecation.elasticsearch-default-*");
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you ask the Data Management team about this?


ObjectMapper mapper = new ObjectMapper();
final JsonNode jsonNode = mapper.readTree(response.getEntity().getContent());
logger.warn(documents);
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we want this linen now.

@@ -121,6 +125,7 @@
/**
* Base class of ML integration tests that use a native autodetect process
*/
//@ESIntegTestCase.ClusterScope(scope = TEST, numClientNodes = 0, maxNumDataNodes = 1)
Copy link
Contributor

Choose a reason for hiding this comment

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

Leftover line?

).actionGet();
assertAcked(response);
}

@Override
protected void beforeIndexDeletion() throws Exception {
super.beforeIndexDeletion();
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is problematic, because if we want to remove indices on cleanup we have to remember to disable deprecation log indexing. Otherwise it might create a deprecation and recreate datastream and its indices.

@danhermann
Copy link
Contributor

@pgomulka, note that I opened #78850 to document the approach we think is best for addressing the template deletion issue you encountered here.

@pgomulka
Copy link
Contributor Author

closing in favour of #78991

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Core/Infra/Logging Log management and logging utilities Team:Clients Meta label for clients team Team:Core/Infra Meta label for core/infra team v7.16.0 v8.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Document "cluster.deprecation_indexing.enabled" Enable deprecation log indexing by default
7 participants