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

squakez pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 1192eb7740357e6340f65ebbb7738c01c2f8381a
Author: Pasquale Congiusti <[email protected]>
AuthorDate: Fri May 8 10:09:44 2026 +0200

    chore(core): support telemetry disable processor parameter
    
    Ref #23002
---
 .../main/Otel2ConfigurationPropertiesConfigurer.java   |  7 +++++++
 .../TelemetryDevConfigurationPropertiesConfigurer.java |  7 +++++++
 .../META-INF/camel-main-configuration-metadata.json    |  8 ++++----
 core/camel-main/src/main/docs/main.adoc                | 12 ++++++------
 .../camel/main/Otel2ConfigurationProperties.java       | 18 +++++++++++++++---
 .../main/TelemetryDevConfigurationProperties.java      | 18 +++++++++++++++---
 6 files changed, 54 insertions(+), 16 deletions(-)

diff --git 
a/core/camel-main/src/generated/java/org/apache/camel/main/Otel2ConfigurationPropertiesConfigurer.java
 
b/core/camel-main/src/generated/java/org/apache/camel/main/Otel2ConfigurationPropertiesConfigurer.java
index 4fd58303ebc4..2085a44d6b39 100644
--- 
a/core/camel-main/src/generated/java/org/apache/camel/main/Otel2ConfigurationPropertiesConfigurer.java
+++ 
b/core/camel-main/src/generated/java/org/apache/camel/main/Otel2ConfigurationPropertiesConfigurer.java
@@ -22,6 +22,7 @@ public class Otel2ConfigurationPropertiesConfigurer extends 
org.apache.camel.sup
     private static final Map<String, Object> ALL_OPTIONS;
     static {
         Map<String, Object> map = new CaseInsensitiveMap();
+        map.put("DisableCoreProcessors", java.lang.Boolean.class);
         map.put("Enabled", boolean.class);
         map.put("Encoding", boolean.class);
         map.put("ExcludePatterns", java.lang.String.class);
@@ -34,6 +35,8 @@ public class Otel2ConfigurationPropertiesConfigurer extends 
org.apache.camel.sup
     public boolean configure(CamelContext camelContext, Object obj, String 
name, Object value, boolean ignoreCase) {
         org.apache.camel.main.Otel2ConfigurationProperties target = 
(org.apache.camel.main.Otel2ConfigurationProperties) obj;
         switch (ignoreCase ? name.toLowerCase() : name) {
+        case "disablecoreprocessors":
+        case "disableCoreProcessors": 
target.setDisableCoreProcessors(property(camelContext, java.lang.Boolean.class, 
value)); return true;
         case "enabled": target.setEnabled(property(camelContext, 
boolean.class, value)); return true;
         case "encoding": target.setEncoding(property(camelContext, 
boolean.class, value)); return true;
         case "excludepatterns":
@@ -54,6 +57,8 @@ public class Otel2ConfigurationPropertiesConfigurer extends 
org.apache.camel.sup
     @Override
     public Class<?> getOptionType(String name, boolean ignoreCase) {
         switch (ignoreCase ? name.toLowerCase() : name) {
+        case "disablecoreprocessors":
+        case "disableCoreProcessors": return java.lang.Boolean.class;
         case "enabled": return boolean.class;
         case "encoding": return boolean.class;
         case "excludepatterns":
@@ -70,6 +75,8 @@ public class Otel2ConfigurationPropertiesConfigurer extends 
org.apache.camel.sup
     public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
         org.apache.camel.main.Otel2ConfigurationProperties target = 
(org.apache.camel.main.Otel2ConfigurationProperties) obj;
         switch (ignoreCase ? name.toLowerCase() : name) {
+        case "disablecoreprocessors":
+        case "disableCoreProcessors": return target.isDisableCoreProcessors();
         case "enabled": return target.isEnabled();
         case "encoding": return target.isEncoding();
         case "excludepatterns":
diff --git 
a/core/camel-main/src/generated/java/org/apache/camel/main/TelemetryDevConfigurationPropertiesConfigurer.java
 
b/core/camel-main/src/generated/java/org/apache/camel/main/TelemetryDevConfigurationPropertiesConfigurer.java
index 0c2cbf1ebd70..f25b95f0a8dc 100644
--- 
a/core/camel-main/src/generated/java/org/apache/camel/main/TelemetryDevConfigurationPropertiesConfigurer.java
+++ 
b/core/camel-main/src/generated/java/org/apache/camel/main/TelemetryDevConfigurationPropertiesConfigurer.java
@@ -22,6 +22,7 @@ public class TelemetryDevConfigurationPropertiesConfigurer 
extends org.apache.ca
     private static final Map<String, Object> ALL_OPTIONS;
     static {
         Map<String, Object> map = new CaseInsensitiveMap();
+        map.put("DisableCoreProcessors", java.lang.Boolean.class);
         map.put("Enabled", boolean.class);
         map.put("ExcludePatterns", java.lang.String.class);
         map.put("TraceFormat", java.lang.String.class);
@@ -33,6 +34,8 @@ public class TelemetryDevConfigurationPropertiesConfigurer 
extends org.apache.ca
     public boolean configure(CamelContext camelContext, Object obj, String 
name, Object value, boolean ignoreCase) {
         org.apache.camel.main.TelemetryDevConfigurationProperties target = 
(org.apache.camel.main.TelemetryDevConfigurationProperties) obj;
         switch (ignoreCase ? name.toLowerCase() : name) {
+        case "disablecoreprocessors":
+        case "disableCoreProcessors": 
target.setDisableCoreProcessors(property(camelContext, java.lang.Boolean.class, 
value)); return true;
         case "enabled": target.setEnabled(property(camelContext, 
boolean.class, value)); return true;
         case "excludepatterns":
         case "excludePatterns": 
target.setExcludePatterns(property(camelContext, java.lang.String.class, 
value)); return true;
@@ -52,6 +55,8 @@ public class TelemetryDevConfigurationPropertiesConfigurer 
extends org.apache.ca
     @Override
     public Class<?> getOptionType(String name, boolean ignoreCase) {
         switch (ignoreCase ? name.toLowerCase() : name) {
+        case "disablecoreprocessors":
+        case "disableCoreProcessors": return java.lang.Boolean.class;
         case "enabled": return boolean.class;
         case "excludepatterns":
         case "excludePatterns": return java.lang.String.class;
@@ -67,6 +72,8 @@ public class TelemetryDevConfigurationPropertiesConfigurer 
extends org.apache.ca
     public Object getOptionValue(Object obj, String name, boolean ignoreCase) {
         org.apache.camel.main.TelemetryDevConfigurationProperties target = 
(org.apache.camel.main.TelemetryDevConfigurationProperties) obj;
         switch (ignoreCase ? name.toLowerCase() : name) {
+        case "disablecoreprocessors":
+        case "disableCoreProcessors": return target.isDisableCoreProcessors();
         case "enabled": return target.isEnabled();
         case "excludepatterns":
         case "excludePatterns": return target.getExcludePatterns();
diff --git 
a/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
 
b/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
index 2ade118a12ff..64c944a9d65a 100644
--- 
a/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
+++ 
b/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
@@ -251,9 +251,9 @@
     { "name": "camel.opentelemetry.traceProcessors", "required": false, 
"description": "Setting this to true will create new OpenTelemetry Spans for 
each Camel Processors. Use the excludePattern property to filter out 
Processors.", "sourceType": 
"org.apache.camel.main.OtelConfigurationProperties", "type": "boolean", 
"javaType": "boolean", "defaultValue": false, "secret": false },
     { "name": "camel.opentelemetry2.enabled", "required": false, 
"description": "To enable OpenTelemetry 2", "sourceType": 
"org.apache.camel.main.Otel2ConfigurationProperties", "type": "boolean", 
"javaType": "boolean", "defaultValue": false, "secret": false },
     { "name": "camel.opentelemetry2.encoding", "required": false, 
"description": "Sets whether the header keys need to be encoded (connector 
specific) or not. The value is a boolean. Dashes need for instances to be 
encoded for JMS property keys.", "sourceType": 
"org.apache.camel.main.Otel2ConfigurationProperties", "type": "boolean", 
"javaType": "boolean", "defaultValue": false, "secret": false },
-    { "name": "camel.opentelemetry2.excludePatterns", "required": false, 
"description": "Adds an exclude pattern that will disable tracing for Camel 
messages that matches the pattern. Multiple patterns can be separated by 
comma.", "sourceType": "org.apache.camel.main.Otel2ConfigurationProperties", 
"type": "string", "javaType": "java.lang.String", "secret": false },
+    { "name": "camel.opentelemetry2.excludePatterns", "required": false, 
"description": "Sets exclude pattern(s) that will disable tracing for Camel 
processors that matches the pattern. Multiple patterns can be separated by 
comma.", "sourceType": "org.apache.camel.main.Otel2ConfigurationProperties", 
"type": "string", "javaType": "java.lang.String", "secret": false },
     { "name": "camel.opentelemetry2.instrumentationName", "required": true, 
"description": "A name uniquely identifying the instrumentation scope, such as 
the instrumentation library, package, or fully qualified class name. Must not 
be null.", "sourceType": "org.apache.camel.main.Otel2ConfigurationProperties", 
"type": "string", "javaType": "java.lang.String", "defaultValue": "camel", 
"secret": false },
-    { "name": "camel.opentelemetry2.traceProcessors", "required": false, 
"description": "Setting this to true will create new OpenTelemetry Spans for 
each Camel Processors. Use the excludePattern property to filter out 
Processors.", "sourceType": 
"org.apache.camel.main.Otel2ConfigurationProperties", "type": "boolean", 
"javaType": "boolean", "defaultValue": false, "secret": false },
+    { "name": "camel.opentelemetry2.traceProcessors", "required": false, 
"description": "Setting this to true will create new telemetry spans for each 
Camel custom Processors. Use the excludePattern property to filter out 
Processors.", "sourceType": 
"org.apache.camel.main.Otel2ConfigurationProperties", "type": "boolean", 
"javaType": "boolean", "defaultValue": false, "secret": false },
     { "name": 
"camel.resilience4j.automaticTransitionFromOpenToHalfOpenEnabled", "required": 
false, "description": "Enables automatic transition from OPEN to HALF_OPEN 
state once the waitDurationInOpenState has passed.", "sourceType": 
"org.apache.camel.main.Resilience4jConfigurationProperties", "type": "boolean", 
"javaType": "java.lang.Boolean", "defaultValue": false, "secret": false },
     { "name": "camel.resilience4j.bulkheadEnabled", "required": false, 
"description": "Whether bulkhead is enabled or not on the circuit breaker.", 
"sourceType": "org.apache.camel.main.Resilience4jConfigurationProperties", 
"type": "boolean", "javaType": "java.lang.Boolean", "defaultValue": false, 
"secret": false },
     { "name": "camel.resilience4j.bulkheadMaxConcurrentCalls", "required": 
false, "description": "Configures the max amount of concurrent calls the 
bulkhead will support.", "sourceType": 
"org.apache.camel.main.Resilience4jConfigurationProperties", "type": "integer", 
"javaType": "java.lang.Integer", "secret": false },
@@ -377,9 +377,9 @@
     { "name": "camel.startupcondition.onTimeout", "required": false, 
"description": "What action, to do on timeout. fail = do not startup, and throw 
an exception causing camel to fail stop = do not startup, and stop camel ignore 
= log a WARN and continue to startup", "sourceType": 
"org.apache.camel.main.StartupConditionConfigurationProperties", "type": 
"enum", "javaType": "java.lang.String", "defaultValue": "stop", "secret": 
false, "enum": [ "fail", "stop", "ignore" ] },
     { "name": "camel.startupcondition.timeout", "required": false, 
"description": "Total timeout (in millis) for all startup conditions.", 
"sourceType": "org.apache.camel.main.StartupConditionConfigurationProperties", 
"type": "integer", "javaType": "int", "defaultValue": 20000, "secret": false },
     { "name": "camel.telemetryDev.enabled", "required": false, "description": 
"To enable TelemetryDev", "sourceType": 
"org.apache.camel.main.TelemetryDevConfigurationProperties", "type": "boolean", 
"javaType": "boolean", "defaultValue": false, "secret": false },
-    { "name": "camel.telemetryDev.excludePatterns", "required": false, 
"description": "Adds an exclude pattern that will disable tracing for Camel 
messages that matches the pattern. Multiple patterns can be separated by 
comma.", "sourceType": 
"org.apache.camel.main.TelemetryDevConfigurationProperties", "type": "string", 
"javaType": "java.lang.String", "secret": false },
+    { "name": "camel.telemetryDev.excludePatterns", "required": false, 
"description": "Sets exclude pattern(s) that will disable tracing for Camel 
processors that matches the pattern. Multiple patterns can be separated by 
comma.", "sourceType": 
"org.apache.camel.main.TelemetryDevConfigurationProperties", "type": "string", 
"javaType": "java.lang.String", "secret": false },
     { "name": "camel.telemetryDev.traceFormat", "required": false, 
"description": "The output format for traces.", "sourceType": 
"org.apache.camel.main.TelemetryDevConfigurationProperties", "type": "string", 
"javaType": "java.lang.String", "secret": false },
-    { "name": "camel.telemetryDev.traceProcessors", "required": false, 
"description": "Setting this to true will create new TelemetrySimple Spans for 
each Camel Processors. Use the excludePattern property to filter out 
Processors.", "sourceType": 
"org.apache.camel.main.TelemetryDevConfigurationProperties", "type": "boolean", 
"javaType": "boolean", "defaultValue": false, "secret": false },
+    { "name": "camel.telemetryDev.traceProcessors", "required": false, 
"description": "Setting this to true will create new telemetry spans for each 
Camel custom Processors. Use the excludePattern property to filter out 
Processors.", "sourceType": 
"org.apache.camel.main.TelemetryDevConfigurationProperties", "type": "boolean", 
"javaType": "boolean", "defaultValue": false, "secret": false },
     { "name": "camel.threadpool.allowCoreThreadTimeOut", "required": false, 
"description": "Sets default whether to allow core threads to timeout", 
"sourceType": "org.apache.camel.main.ThreadPoolConfigurationProperties", 
"type": "boolean", "javaType": "java.lang.Boolean", "defaultValue": false, 
"secret": false },
     { "name": "camel.threadpool.config", "required": false, "description": 
"Adds a configuration for a specific thread pool profile (inherits default 
values)", "sourceType": 
"org.apache.camel.main.ThreadPoolConfigurationProperties", "type": "object", 
"javaType": "java.util.Map", "secret": false },
     { "name": "camel.threadpool.keepAliveTime", "required": false, 
"description": "Sets the default keep alive time for inactive threads", 
"sourceType": "org.apache.camel.main.ThreadPoolConfigurationProperties", 
"type": "integer", "javaType": "java.lang.Long", "secret": false },
diff --git a/core/camel-main/src/main/docs/main.adoc 
b/core/camel-main/src/main/docs/main.adoc
index 84cce8f09284..cb17c720af87 100644
--- a/core/camel-main/src/main/docs/main.adoc
+++ b/core/camel-main/src/main/docs/main.adoc
@@ -578,9 +578,9 @@ The camel.opentelemetry supports 10 options, which are 
listed below.
 | *camel.opentelemetry.traceProcessors* | Setting this to true will create new 
OpenTelemetry Spans for each Camel Processors. Use the excludePattern property 
to filter out Processors. | false | boolean
 | *camel.opentelemetry2.enabled* | To enable OpenTelemetry 2 | false | boolean
 | *camel.opentelemetry2.encoding* | Sets whether the header keys need to be 
encoded (connector specific) or not. The value is a boolean. Dashes need for 
instances to be encoded for JMS property keys. | false | boolean
-| *camel.opentelemetry2.excludePatterns* | Adds an exclude pattern that will 
disable tracing for Camel messages that matches the pattern. Multiple patterns 
can be separated by comma. |  | String
+| *camel.opentelemetry2.excludePatterns* | Sets exclude pattern(s) that will 
disable tracing for Camel processors that matches the pattern. Multiple 
patterns can be separated by comma. |  | String
 | *camel.opentelemetry2.instrumentationName* | A name uniquely identifying the 
instrumentation scope, such as the instrumentation library, package, or fully 
qualified class name. Must not be null. | camel | String
-| *camel.opentelemetry2.traceProcessors* | Setting this to true will create 
new OpenTelemetry Spans for each Camel Processors. Use the excludePattern 
property to filter out Processors. | false | boolean
+| *camel.opentelemetry2.traceProcessors* | Setting this to true will create 
new telemetry spans for each Camel custom Processors. Use the excludePattern 
property to filter out Processors. | false | boolean
 |===
 
 
@@ -592,9 +592,9 @@ The camel.opentelemetry2 supports 5 options, which are 
listed below.
 | Name | Description | Default | Type
 | *camel.opentelemetry2.enabled* | To enable OpenTelemetry 2 | false | boolean
 | *camel.opentelemetry2.encoding* | Sets whether the header keys need to be 
encoded (connector specific) or not. The value is a boolean. Dashes need for 
instances to be encoded for JMS property keys. | false | boolean
-| *camel.opentelemetry2.excludePatterns* | Adds an exclude pattern that will 
disable tracing for Camel messages that matches the pattern. Multiple patterns 
can be separated by comma. |  | String
+| *camel.opentelemetry2.excludePatterns* | Sets exclude pattern(s) that will 
disable tracing for Camel processors that matches the pattern. Multiple 
patterns can be separated by comma. |  | String
 | *camel.opentelemetry2.instrumentationName* | A name uniquely identifying the 
instrumentation scope, such as the instrumentation library, package, or fully 
qualified class name. Must not be null. | camel | String
-| *camel.opentelemetry2.traceProcessors* | Setting this to true will create 
new OpenTelemetry Spans for each Camel Processors. Use the excludePattern 
property to filter out Processors. | false | boolean
+| *camel.opentelemetry2.traceProcessors* | Setting this to true will create 
new telemetry spans for each Camel custom Processors. Use the excludePattern 
property to filter out Processors. | false | boolean
 |===
 
 
@@ -605,9 +605,9 @@ The camel.telemetryDev supports 4 options, which are listed 
below.
 |===
 | Name | Description | Default | Type
 | *camel.telemetryDev.enabled* | To enable TelemetryDev | false | boolean
-| *camel.telemetryDev.excludePatterns* | Adds an exclude pattern that will 
disable tracing for Camel messages that matches the pattern. Multiple patterns 
can be separated by comma. |  | String
+| *camel.telemetryDev.excludePatterns* | Sets exclude pattern(s) that will 
disable tracing for Camel processors that matches the pattern. Multiple 
patterns can be separated by comma. |  | String
 | *camel.telemetryDev.traceFormat* | The output format for traces. |  | String
-| *camel.telemetryDev.traceProcessors* | Setting this to true will create new 
TelemetrySimple Spans for each Camel Processors. Use the excludePattern 
property to filter out Processors. | false | boolean
+| *camel.telemetryDev.traceProcessors* | Setting this to true will create new 
telemetry spans for each Camel custom Processors. Use the excludePattern 
property to filter out Processors. | false | boolean
 |===
 
 
diff --git 
a/core/camel-main/src/main/java/org/apache/camel/main/Otel2ConfigurationProperties.java
 
b/core/camel-main/src/main/java/org/apache/camel/main/Otel2ConfigurationProperties.java
index 248051521afc..02ab7cabab86 100644
--- 
a/core/camel-main/src/main/java/org/apache/camel/main/Otel2ConfigurationProperties.java
+++ 
b/core/camel-main/src/main/java/org/apache/camel/main/Otel2ConfigurationProperties.java
@@ -34,6 +34,7 @@ public class Otel2ConfigurationProperties implements 
BootstrapCloseable {
     private boolean encoding;
     private String excludePatterns;
     private boolean traceProcessors;
+    private boolean disableCoreProcessors;
 
     public Otel2ConfigurationProperties(MainConfigurationProperties parent) {
         this.parent = parent;
@@ -88,8 +89,8 @@ public class Otel2ConfigurationProperties implements 
BootstrapCloseable {
     }
 
     /**
-     * Adds an exclude pattern that will disable tracing for Camel messages 
that matches the pattern. Multiple patterns
-     * can be separated by comma.
+     * Sets exclude pattern(s) that will disable tracing for Camel processors 
that matches the pattern. Multiple
+     * patterns can be separated by comma.
      */
     public void setExcludePatterns(String excludePatterns) {
         this.excludePatterns = excludePatterns;
@@ -100,13 +101,24 @@ public class Otel2ConfigurationProperties implements 
BootstrapCloseable {
     }
 
     /**
-     * Setting this to true will create new OpenTelemetry Spans for each Camel 
Processors. Use the excludePattern
+     * Setting this to true will create new telemetry spans for each Camel 
custom Processors. Use the excludePattern
      * property to filter out Processors.
      */
     public void setTraceProcessors(boolean traceProcessors) {
         this.traceProcessors = traceProcessors;
     }
 
+    public boolean isDisableCoreProcessors() {
+        return disableCoreProcessors;
+    }
+
+    /**
+     * Disable any inner core processors (any core DSL processor provided in 
the route, for example `bean`, `log`, ...).
+     */
+    public void setDisableCoreProcessors(Boolean disableCoreProcessors) {
+        this.disableCoreProcessors = disableCoreProcessors;
+    }
+
     /**
      * A name uniquely identifying the instrumentation scope, such as the 
instrumentation library, package, or fully
      * qualified class name. Must not be null.
diff --git 
a/core/camel-main/src/main/java/org/apache/camel/main/TelemetryDevConfigurationProperties.java
 
b/core/camel-main/src/main/java/org/apache/camel/main/TelemetryDevConfigurationProperties.java
index 5c01f4a0f127..792a15ced206 100644
--- 
a/core/camel-main/src/main/java/org/apache/camel/main/TelemetryDevConfigurationProperties.java
+++ 
b/core/camel-main/src/main/java/org/apache/camel/main/TelemetryDevConfigurationProperties.java
@@ -30,6 +30,7 @@ public class TelemetryDevConfigurationProperties implements 
BootstrapCloseable {
     private boolean enabled;
     private String excludePatterns;
     private boolean traceProcessors;
+    private boolean disableCoreProcessors;
     private String traceFormat;
 
     public TelemetryDevConfigurationProperties(MainConfigurationProperties 
parent) {
@@ -61,8 +62,8 @@ public class TelemetryDevConfigurationProperties implements 
BootstrapCloseable {
     }
 
     /**
-     * Adds an exclude pattern that will disable tracing for Camel messages 
that matches the pattern. Multiple patterns
-     * can be separated by comma.
+     * Sets exclude pattern(s) that will disable tracing for Camel processors 
that matches the pattern. Multiple
+     * patterns can be separated by comma.
      */
     public void setExcludePatterns(String excludePatterns) {
         this.excludePatterns = excludePatterns;
@@ -73,13 +74,24 @@ public class TelemetryDevConfigurationProperties implements 
BootstrapCloseable {
     }
 
     /**
-     * Setting this to true will create new TelemetrySimple Spans for each 
Camel Processors. Use the excludePattern
+     * Setting this to true will create new telemetry spans for each Camel 
custom Processors. Use the excludePattern
      * property to filter out Processors.
      */
     public void setTraceProcessors(boolean traceProcessors) {
         this.traceProcessors = traceProcessors;
     }
 
+    public boolean isDisableCoreProcessors() {
+        return disableCoreProcessors;
+    }
+
+    /**
+     * Disable any inner core processors (any core DSL processor provided in 
the route, for example `bean`, `log`, ...).
+     */
+    public void setDisableCoreProcessors(Boolean disableCoreProcessors) {
+        this.disableCoreProcessors = disableCoreProcessors;
+    }
+
     public String getTraceFormat() {
         return traceFormat;
     }

Reply via email to