Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/changelog/147811.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
area: Logs
issues: []
pr: 147811
summary: Enable OTLP logs and traces by default
type: enhancement
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ public enum FeatureFlag {
EXTENDED_DOC_VALUES_PARAMS("es.extended_doc_values_options_feature_flag_enabled=true", Version.fromString("9.3.0"), null),
TSDB_NO_SEQNO("es.tsdb_no_tsbd_feature_flag_enabled=true", Version.fromString("9.4.0"), null),
IGNORED_SOURCE_AS_DOC_VALUES_FF("es.ignored_source_as_doc_values_feature_flag_enabled=true", Version.fromString("9.4.0"), null),
PROMETHEUS_FEATURE_FLAG("es.prometheus_feature_flag_enabled=true", Version.fromString("9.4.0"), null),
OTLP_TRACES("es.otlp_traces_feature_flag_enabled=true", Version.fromString("9.4.0"), null),
OTLP_LOGS("es.otlp_logs_feature_flag_enabled=true", Version.fromString("9.4.0"), null);
PROMETHEUS_FEATURE_FLAG("es.prometheus_feature_flag_enabled=true", Version.fromString("9.4.0"), null);

public final String systemProperty;
public final Version from;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.util.concurrent.ThreadContext;
import org.elasticsearch.test.cluster.ElasticsearchCluster;
import org.elasticsearch.test.cluster.FeatureFlag;
import org.elasticsearch.test.cluster.local.distribution.DistributionType;
import org.elasticsearch.test.rest.ESRestTestCase;
import org.elasticsearch.test.rest.ObjectPath;
Expand Down Expand Up @@ -50,8 +49,6 @@ public abstract class AbstractOTLPIndexingRestIT extends ESRestTestCase {
.setting("xpack.license.self_generated.type", "trial")
.setting("xpack.ml.enabled", "false")
.setting("xpack.watcher.enabled", "false")
.feature(FeatureFlag.OTLP_TRACES)
.feature(FeatureFlag.OTLP_LOGS)
.build();

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import org.elasticsearch.cluster.service.ClusterService;
import org.elasticsearch.common.settings.Setting;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.common.util.FeatureFlag;
import org.elasticsearch.features.NodeFeature;
import org.elasticsearch.http.HttpTransportSettings;
import org.elasticsearch.index.IndexingPressure;
Expand Down Expand Up @@ -62,8 +61,6 @@ public enum HistogramMappingSettingValues {

private static final Logger logger = LogManager.getLogger(OTelPlugin.class);

private static final boolean OTLP_TRACES_ENABLED = new FeatureFlag("otlp_traces").isEnabled();
private static final boolean OTLP_LOGS_ENABLED = new FeatureFlag("otlp_logs").isEnabled();
private final SetOnce<OTelIndexTemplateRegistry> registry = new SetOnce<>();
private final SetOnce<IndexingPressure> indexingPressure = new SetOnce<>();
private final boolean enabled;
Expand All @@ -83,12 +80,8 @@ public Collection<RestHandler> getRestHandlers(
assert indexingPressure.get() != null : "indexing pressure must be set";
List<RestHandler> handlers = new ArrayList<>(3);
handlers.add(new OTLPMetricsRestAction(indexingPressure.get(), maxProtobufContentLengthBytes));
if (OTLP_TRACES_ENABLED) {
handlers.add(new OTLPTracesRestAction(indexingPressure.get(), maxProtobufContentLengthBytes));
}
if (OTLP_LOGS_ENABLED) {
handlers.add(new OTLPLogsRestAction(indexingPressure.get(), maxProtobufContentLengthBytes));
}
handlers.add(new OTLPTracesRestAction(indexingPressure.get(), maxProtobufContentLengthBytes));
handlers.add(new OTLPLogsRestAction(indexingPressure.get(), maxProtobufContentLengthBytes));
return handlers;
}

Expand Down Expand Up @@ -123,12 +116,8 @@ public List<Setting<?>> getSettings() {
public Collection<ActionHandler> getActions() {
List<ActionHandler> handlers = new ArrayList<>(3);
handlers.add(new ActionHandler(OTLPMetricsTransportAction.TYPE, OTLPMetricsTransportAction.class));
if (OTLP_TRACES_ENABLED) {
handlers.add(new ActionHandler(OTLPTracesTransportAction.TYPE, OTLPTracesTransportAction.class));
}
if (OTLP_LOGS_ENABLED) {
handlers.add(new ActionHandler(OTLPLogsTransportAction.TYPE, OTLPLogsTransportAction.class));
}
handlers.add(new ActionHandler(OTLPTracesTransportAction.TYPE, OTLPTracesTransportAction.class));
handlers.add(new ActionHandler(OTLPLogsTransportAction.TYPE, OTLPLogsTransportAction.class));
return handlers;
}
}
Loading