This is an automated email from the ASF dual-hosted git repository.

github-bot pushed a commit to branch quarkus-main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git

commit 4be6ef9a357b00cd297c0925813f765d2211c613
Author: James Netherton <jamesnether...@gmail.com>
AuthorDate: Tue Feb 11 13:04:43 2025 +0000

    Remove obserability-services config workaround for /observe endpoint tracing
    
    Fixes #6967
---
 .../deployment/ObservabilityServicesProcessor.java |  9 ----
 .../ObservabilityServicesConfigSourceFactory.java  | 54 ----------------------
 .../ObservabilityServicesRuntimeConfigBuilder.java | 27 -----------
 3 files changed, 90 deletions(-)

diff --git 
a/extensions/observability-services/deployment/src/main/java/org/apache/camel/quarkus/component/observabilityservices/deployment/ObservabilityServicesProcessor.java
 
b/extensions/observability-services/deployment/src/main/java/org/apache/camel/quarkus/component/observabilityservices/deployment/ObservabilityServicesProcessor.java
index 63be81aa25..4d8027ac5e 100644
--- 
a/extensions/observability-services/deployment/src/main/java/org/apache/camel/quarkus/component/observabilityservices/deployment/ObservabilityServicesProcessor.java
+++ 
b/extensions/observability-services/deployment/src/main/java/org/apache/camel/quarkus/component/observabilityservices/deployment/ObservabilityServicesProcessor.java
@@ -18,9 +18,6 @@ package 
org.apache.camel.quarkus.component.observabilityservices.deployment;
 
 import io.quarkus.deployment.annotations.BuildStep;
 import io.quarkus.deployment.builditem.FeatureBuildItem;
-import io.quarkus.deployment.builditem.RunTimeConfigBuilderBuildItem;
-import io.quarkus.opentelemetry.deployment.tracing.TracerEnabled;
-import 
org.apache.camel.quarkus.component.observabilityservices.ObservabilityServicesRuntimeConfigBuilder;
 
 class ObservabilityServicesProcessor {
     private static final String FEATURE = "camel-observability-services";
@@ -29,10 +26,4 @@ class ObservabilityServicesProcessor {
     FeatureBuildItem feature() {
         return new FeatureBuildItem(FEATURE);
     }
-
-    // TODO: Remove this https://github.com/apache/camel-quarkus/issues/6967
-    @BuildStep(onlyIf = TracerEnabled.class)
-    RunTimeConfigBuilderBuildItem observabilityServicesRuntimeConfiguration() {
-        return new 
RunTimeConfigBuilderBuildItem(ObservabilityServicesRuntimeConfigBuilder.class);
-    }
 }
diff --git 
a/extensions/observability-services/runtime/src/main/java/org.apache.camel.quarkus.component.observabilityservices/ObservabilityServicesConfigSourceFactory.java
 
b/extensions/observability-services/runtime/src/main/java/org.apache.camel.quarkus.component.observabilityservices/ObservabilityServicesConfigSourceFactory.java
deleted file mode 100644
index 2d2d7714db..0000000000
--- 
a/extensions/observability-services/runtime/src/main/java/org.apache.camel.quarkus.component.observabilityservices/ObservabilityServicesConfigSourceFactory.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.quarkus.component.observabilityservices;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.Set;
-
-import io.smallrye.config.ConfigSourceContext;
-import io.smallrye.config.ConfigSourceFactory;
-import io.smallrye.config.ConfigValue;
-import io.smallrye.config.PropertiesConfigSource;
-import org.apache.camel.util.ObjectHelper;
-import org.eclipse.microprofile.config.spi.ConfigSource;
-
-/**
- * TODO: Remove this https://github.com/apache/camel-quarkus/issues/6967
- */
-public class ObservabilityServicesConfigSourceFactory implements 
ConfigSourceFactory {
-    @Override
-    public Iterable<ConfigSource> getConfigSources(ConfigSourceContext 
context) {
-        ConfigValue sdkDisabled = 
context.getValue("quarkus.otel.sdk.disabled");
-
-        if (sdkDisabled != null && sdkDisabled.getValue().equals("false")) {
-            Map<String, String> properties = new HashMap<>(1);
-            ConfigValue otelSuppressedUris = 
context.getValue("quarkus.otel.traces.suppress-application-uris");
-            String suppressedEndpoints = "/observe/*";
-
-            if (otelSuppressedUris != null && 
ObjectHelper.isNotEmpty(otelSuppressedUris.getValue())) {
-                suppressedEndpoints += "," + otelSuppressedUris.getValue();
-            }
-
-            properties.put("quarkus.otel.traces.suppress-application-uris", 
suppressedEndpoints);
-            return Set.of(new PropertiesConfigSource(properties, 
"camel-quarkus-observability-services", 300));
-        }
-
-        return Collections.emptySet();
-    }
-}
diff --git 
a/extensions/observability-services/runtime/src/main/java/org.apache.camel.quarkus.component.observabilityservices/ObservabilityServicesRuntimeConfigBuilder.java
 
b/extensions/observability-services/runtime/src/main/java/org.apache.camel.quarkus.component.observabilityservices/ObservabilityServicesRuntimeConfigBuilder.java
deleted file mode 100644
index 3a382cc37e..0000000000
--- 
a/extensions/observability-services/runtime/src/main/java/org.apache.camel.quarkus.component.observabilityservices/ObservabilityServicesRuntimeConfigBuilder.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.quarkus.component.observabilityservices;
-
-import io.quarkus.runtime.configuration.ConfigBuilder;
-import io.smallrye.config.SmallRyeConfigBuilder;
-
-public class ObservabilityServicesRuntimeConfigBuilder implements 
ConfigBuilder {
-    @Override
-    public SmallRyeConfigBuilder configBuilder(SmallRyeConfigBuilder builder) {
-        return builder.withSources(new 
ObservabilityServicesConfigSourceFactory());
-    }
-}

Reply via email to