Version 1.17.0 of the OpenTelemetry Java SDK was released a few days ago, and this release includes a fix for the performance bug identified in https://github.com/elastic/elasticsearch/issues/89107. We should upgrade to the latest version and revert the workaround introduced in https://github.com/elastic/elasticsearch/pull/89135.
modules/apm/src/main/java/org/elasticsearch/tracing/apm/APMTracer.java
public APMTracer(Settings settings) {
        this.includeNames = APM_TRACING_NAMES_INCLUDE_SETTING.get(settings);
        this.excludeNames = APM_TRACING_NAMES_EXCLUDE_SETTING.get(settings);
        this.filterAutomaton = buildAutomaton(includeNames, excludeNames);
        this.enabled = APM_ENABLED_SETTING.get(settings);
    }
    void setEnabled(boolean enabled) {
        this.enabled = enabled;
        if (enabled) {
            this.services = createApmServices();
        } else {
            destroyApmServices();
        }
    }
    void setIncludeNames(List<String> includeNames) {
        this.includeNames = includeNames;
        this.filterAutomaton = buildAutomaton(includeNames, excludeNames);
    }
    void setExcludeNames(List<String> excludeNames) {
        this.excludeNames = excludeNames;
        this.filterAutomaton = buildAutomaton(includeNames, excludeNames);
    }
    @Override
    protected void doStart() {
        if (enabled) {
            this.services = createApmServices();
        }
    }
    @Override
    protected void doStop() {