Skip to content

Commit

Permalink
Change grok performance_metadata to be disabled by default (opensearc…
Browse files Browse the repository at this point in the history
…h-project#4235)

Signed-off-by: Taylor Gray <[email protected]>
  • Loading branch information
graytaylor0 authored Mar 5, 2024
1 parent e76d831 commit afc85e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public static GrokProcessorConfig buildConfig(final PluginSetting pluginSetting)
pluginSetting.getStringOrDefault(GROK_WHEN, null),
pluginSetting.getTypedList(TAGS_ON_MATCH_FAILURE, String.class),
pluginSetting.getTypedList(TAGS_ON_TIMEOUT, String.class),
pluginSetting.getBooleanOrDefault(INCLUDE_PERFORMANCE_METADATA, true));
pluginSetting.getBooleanOrDefault(INCLUDE_PERFORMANCE_METADATA, false));
}

public boolean isBreakOnMatch() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public void testDefault() {
assertThat(grokProcessorConfig.getGrokWhen(), equalTo(null));
assertThat(grokProcessorConfig.getTagsOnMatchFailure(), equalTo(Collections.emptyList()));
assertThat(grokProcessorConfig.getTagsOnTimeout(), equalTo(Collections.emptyList()));
assertThat(grokProcessorConfig.getIncludePerformanceMetadata(), equalTo(true));
assertThat(grokProcessorConfig.getIncludePerformanceMetadata(), equalTo(false));
}

@Test
Expand All @@ -93,7 +93,7 @@ public void testValidConfig() {
TEST_PATTERN_DEFINITIONS,
TEST_TIMEOUT_MILLIS,
TEST_TARGET_KEY,
false);
true);

final GrokProcessorConfig grokProcessorConfig = GrokProcessorConfig.buildConfig(validPluginSetting);

Expand All @@ -107,7 +107,7 @@ public void testValidConfig() {
assertThat(grokProcessorConfig.getTargetKey(), equalTo(TEST_TARGET_KEY));
assertThat(grokProcessorConfig.isNamedCapturesOnly(), equalTo(false));
assertThat(grokProcessorConfig.getTimeoutMillis(), equalTo(TEST_TIMEOUT_MILLIS));
assertThat(grokProcessorConfig.getIncludePerformanceMetadata(), equalTo(false));
assertThat(grokProcessorConfig.getIncludePerformanceMetadata(), equalTo(true));
}

@Test
Expand Down

0 comments on commit afc85e0

Please sign in to comment.