Putting the ingest otel processor behind the logs stream feature flag (#129667)

This commit is contained in:
Keith Massey 2025-06-18 17:40:12 -05:00 committed by GitHub
parent 32827386c2
commit 92e4244f8e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 13 additions and 3 deletions

View file

@ -9,6 +9,7 @@
package org.elasticsearch.ingest.otel;
import org.elasticsearch.cluster.metadata.DataStream;
import org.elasticsearch.ingest.Processor;
import org.elasticsearch.plugins.IngestPlugin;
import org.elasticsearch.plugins.Plugin;
@ -19,6 +20,10 @@ public class NormalizeForStreamPlugin extends Plugin implements IngestPlugin {
@Override
public Map<String, Processor.Factory> getProcessors(Processor.Parameters parameters) {
return Map.of(NormalizeForStreamProcessor.TYPE, new NormalizeForStreamProcessor.Factory());
if (DataStream.LOGS_STREAM_FEATURE_FLAG) {
return Map.of(NormalizeForStreamProcessor.TYPE, new NormalizeForStreamProcessor.Factory());
} else {
return Map.of();
}
}
}

View file

@ -13,6 +13,7 @@ import com.carrotsearch.randomizedtesting.annotations.Name;
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
import org.elasticsearch.test.cluster.ElasticsearchCluster;
import org.elasticsearch.test.cluster.FeatureFlag;
import org.elasticsearch.test.rest.yaml.ClientYamlTestCandidate;
import org.elasticsearch.test.rest.yaml.ESClientYamlSuiteTestCase;
import org.junit.ClassRule;
@ -24,7 +25,10 @@ public class IngestOtelClientYamlTestSuiteIT extends ESClientYamlSuiteTestCase {
}
@ClassRule
public static ElasticsearchCluster cluster = ElasticsearchCluster.local().module("ingest-otel").build();
public static ElasticsearchCluster cluster = ElasticsearchCluster.local()
.module("ingest-otel")
.feature(FeatureFlag.LOGS_STREAM)
.build();
@Override
protected String getTestRestCluster() {

View file

@ -21,7 +21,8 @@ public enum FeatureFlag {
DOC_VALUES_SKIPPER("es.doc_values_skipper_feature_flag_enabled=true", Version.fromString("8.18.1"), null),
USE_LUCENE101_POSTINGS_FORMAT("es.use_lucene101_postings_format_feature_flag_enabled=true", Version.fromString("9.1.0"), null),
INFERENCE_CUSTOM_SERVICE_ENABLED("es.inference_custom_service_feature_flag_enabled=true", Version.fromString("8.19.0"), null),
IVF_FORMAT("es.ivf_format_feature_flag_enabled=true", Version.fromString("9.1.0"), null);
IVF_FORMAT("es.ivf_format_feature_flag_enabled=true", Version.fromString("9.1.0"), null),
LOGS_STREAM("es.logs_stream_feature_flag_enabled=true", Version.fromString("9.1.0"), null);
public final String systemProperty;
public final Version from;