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

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git


The following commit(s) were added to refs/heads/main by this push:
     new 6b6fd3f333f Add missing traceCustomIdOnly and traceHeadersInclusion 
properties to opentelemetry2 starter
6b6fd3f333f is described below

commit 6b6fd3f333f0a4cd7429fb8382a4c9b77c16d112
Author: Claus Ibsen <[email protected]>
AuthorDate: Fri Jul 10 10:56:07 2026 +0200

    Add missing traceCustomIdOnly and traceHeadersInclusion properties to 
opentelemetry2 starter
    
    regen
---
 .../src/main/docs/opentelemetry2.json              | 14 +++++++++++++
 .../starter/OpenTelemetry2AutoConfiguration.java   |  2 ++
 .../OpenTelemetry2ConfigurationProperties.java     | 24 ++++++++++++++++++++++
 .../ROOT/pages/starters/opentelemetry2.adoc        |  4 +++-
 4 files changed, 43 insertions(+), 1 deletion(-)

diff --git 
a/components-starter/camel-opentelemetry2-starter/src/main/docs/opentelemetry2.json
 
b/components-starter/camel-opentelemetry2-starter/src/main/docs/opentelemetry2.json
index d2b49b0bd35..34b7cdc8a2c 100644
--- 
a/components-starter/camel-opentelemetry2-starter/src/main/docs/opentelemetry2.json
+++ 
b/components-starter/camel-opentelemetry2-starter/src/main/docs/opentelemetry2.json
@@ -26,6 +26,20 @@
       "description": "Sets include pattern(s) that will explicitly enable 
tracing for Camel processors that matches the pattern. Multiple patterns can be 
separated by comma. All processors included by default if nothing is 
specified.",
       "sourceType": 
"org.apache.camel.opentelemetry2.starter.OpenTelemetry2ConfigurationProperties"
     },
+    {
+      "name": "camel.opentelemetry2.trace-custom-id-only",
+      "type": "java.lang.Boolean",
+      "description": "Setting this to true will only create trace spans for 
routes and nodes that have a custom id assigned.",
+      "sourceType": 
"org.apache.camel.opentelemetry2.starter.OpenTelemetry2ConfigurationProperties",
+      "defaultValue": false
+    },
+    {
+      "name": "camel.opentelemetry2.trace-headers-inclusion",
+      "type": "java.lang.Boolean",
+      "description": "Setting this to true will include the message headers in 
the trace spans.",
+      "sourceType": 
"org.apache.camel.opentelemetry2.starter.OpenTelemetry2ConfigurationProperties",
+      "defaultValue": false
+    },
     {
       "name": "camel.opentelemetry2.trace-processors",
       "type": "java.lang.Boolean",
diff --git 
a/components-starter/camel-opentelemetry2-starter/src/main/java/org/apache/camel/opentelemetry2/starter/OpenTelemetry2AutoConfiguration.java
 
b/components-starter/camel-opentelemetry2-starter/src/main/java/org/apache/camel/opentelemetry2/starter/OpenTelemetry2AutoConfiguration.java
index 28f02f99436..1a881bb6af0 100644
--- 
a/components-starter/camel-opentelemetry2-starter/src/main/java/org/apache/camel/opentelemetry2/starter/OpenTelemetry2AutoConfiguration.java
+++ 
b/components-starter/camel-opentelemetry2-starter/src/main/java/org/apache/camel/opentelemetry2/starter/OpenTelemetry2AutoConfiguration.java
@@ -47,6 +47,8 @@ public class OpenTelemetry2AutoConfiguration {
         if (config.getDisableCoreProcessors() != null ) {
             
ottracer.setDisableCoreProcessors(config.getDisableCoreProcessors());
         }
+        ottracer.setTraceCustomIdOnly(config.isTraceCustomIdOnly());
+        ottracer.setTraceHeadersInclusion(config.isTraceHeadersInclusion());
         ottracer.init(camelContext);
 
         return ottracer;
diff --git 
a/components-starter/camel-opentelemetry2-starter/src/main/java/org/apache/camel/opentelemetry2/starter/OpenTelemetry2ConfigurationProperties.java
 
b/components-starter/camel-opentelemetry2-starter/src/main/java/org/apache/camel/opentelemetry2/starter/OpenTelemetry2ConfigurationProperties.java
index 6f50fd6848b..289d6474831 100644
--- 
a/components-starter/camel-opentelemetry2-starter/src/main/java/org/apache/camel/opentelemetry2/starter/OpenTelemetry2ConfigurationProperties.java
+++ 
b/components-starter/camel-opentelemetry2-starter/src/main/java/org/apache/camel/opentelemetry2/starter/OpenTelemetry2ConfigurationProperties.java
@@ -40,6 +40,14 @@ public class OpenTelemetry2ConfigurationProperties {
      * Disable any inner core processors (any core DSL processor provided in 
the route, for example `bean`, `log`, ...).
      */
     private boolean disableCoreProcessors;
+    /**
+     * Setting this to true will only create trace spans for routes and nodes 
that have a custom id assigned.
+     */
+    private boolean traceCustomIdOnly;
+    /**
+     * Setting this to true will include the message headers in the trace 
spans.
+     */
+    private boolean traceHeadersInclusion;
 
     public Boolean getTraceProcessors() {
         return traceProcessors;
@@ -72,4 +80,20 @@ public class OpenTelemetry2ConfigurationProperties {
     public void setIncludePatterns(String includePatterns) {
         this.includePatterns = includePatterns;
     }
+
+    public boolean isTraceCustomIdOnly() {
+        return traceCustomIdOnly;
+    }
+
+    public void setTraceCustomIdOnly(boolean traceCustomIdOnly) {
+        this.traceCustomIdOnly = traceCustomIdOnly;
+    }
+
+    public boolean isTraceHeadersInclusion() {
+        return traceHeadersInclusion;
+    }
+
+    public void setTraceHeadersInclusion(boolean traceHeadersInclusion) {
+        this.traceHeadersInclusion = traceHeadersInclusion;
+    }
 }
diff --git a/docs/spring-boot/modules/ROOT/pages/starters/opentelemetry2.adoc 
b/docs/spring-boot/modules/ROOT/pages/starters/opentelemetry2.adoc
index d7fe6e9dd36..24b317db9ef 100644
--- a/docs/spring-boot/modules/ROOT/pages/starters/opentelemetry2.adoc
+++ b/docs/spring-boot/modules/ROOT/pages/starters/opentelemetry2.adoc
@@ -21,7 +21,7 @@ Use the `@CamelOpenTelemetry2` annotation on your Spring Boot 
main class or conf
 
 == Spring Boot Auto-Configuration
 
-The starter supports 4 options, which are listed below.
+The starter supports 6 options, which are listed below.
 
 [width="100%",cols="2,5,^1,2",options="header"]
 |===
@@ -29,5 +29,7 @@ The starter supports 4 options, which are listed below.
 | camel.opentelemetry2.disable-core-processors | Disable any inner core 
processors (any core DSL processor provided in the route, for example `bean`, 
`log`, ...). | false | Boolean
 | camel.opentelemetry2.exclude-patterns | 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.include-patterns | Sets include pattern(s) that will 
explicitly enable tracing for Camel processors that matches the pattern. 
Multiple patterns can be separated by comma. All processors included by default 
if nothing is specified. |  | String
+| camel.opentelemetry2.trace-custom-id-only | Setting this to true will only 
create trace spans for routes and nodes that have a custom id assigned. | false 
| Boolean
+| camel.opentelemetry2.trace-headers-inclusion | Setting this to true will 
include the message headers in the trace spans. | false | Boolean
 | camel.opentelemetry2.trace-processors | Setting this to true will create new 
telemetry spans for each Camel custom Processors. Use the excludePattern 
property to filter out Processors. |  | Boolean
 |===

Reply via email to