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 d4d876155b2 CAMEL-24003: Add activityEnabled and activitySize options
to Spring Boot tracer (#1846)
d4d876155b2 is described below
commit d4d876155b235153395bd87011c70741014efdf1
Author: Claus Ibsen <[email protected]>
AuthorDate: Sun Jul 12 10:43:33 2026 +0200
CAMEL-24003: Add activityEnabled and activitySize options to Spring Boot
tracer (#1846)
Signed-off-by: Claus Ibsen <[email protected]>
Co-authored-by: Claude Opus 4.6 <[email protected]>
---
.../src/main/docs/spring-boot.json | 14 +++++++++++
.../boot/trace/CamelTraceAutoConfiguration.java | 5 ++++
.../trace/CamelTraceConfigurationProperties.java | 28 ++++++++++++++++++++++
3 files changed, 47 insertions(+)
diff --git a/core/camel-spring-boot/src/main/docs/spring-boot.json
b/core/camel-spring-boot/src/main/docs/spring-boot.json
index 85836fd4ea6..e2b2c113a46 100644
--- a/core/camel-spring-boot/src/main/docs/spring-boot.json
+++ b/core/camel-spring-boot/src/main/docs/spring-boot.json
@@ -1585,6 +1585,20 @@
"description": "Sets the default time unit used for keep alive time",
"sourceType":
"org.apache.camel.spring.boot.threadpool.CamelThreadPoolConfigurationProperties"
},
+ {
+ "name": "camel.trace.activity-enabled",
+ "type": "java.lang.Boolean",
+ "description": "Whether activity tracking is enabled.",
+ "sourceType":
"org.apache.camel.spring.boot.trace.CamelTraceConfigurationProperties",
+ "defaultValue": false
+ },
+ {
+ "name": "camel.trace.activity-size",
+ "type": "java.lang.Integer",
+ "description": "Number of completed exchange summaries to keep in the
activity queue (should be between 1 - 1000). Default is 100.",
+ "sourceType":
"org.apache.camel.spring.boot.trace.CamelTraceConfigurationProperties",
+ "defaultValue": 100
+ },
{
"name": "camel.trace.backlog-size",
"type": "java.lang.Integer",
diff --git
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/trace/CamelTraceAutoConfiguration.java
b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/trace/CamelTraceAutoConfiguration.java
index c3f3c1ac6c9..b4ebfa3acf0 100644
---
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/trace/CamelTraceAutoConfiguration.java
+++
b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/trace/CamelTraceAutoConfiguration.java
@@ -63,6 +63,11 @@ public class CamelTraceAutoConfiguration {
tracer.setTraceTemplates(config.isTraceTemplates());
tracer.setTracePattern(config.getTracePattern());
tracer.setTraceFilter(config.getTraceFilter());
+ tracer.setActivitySize(config.getActivitySize());
+ // dev profile enables activity tracking so tooling (TUI) gets
enriched data
+ boolean activityEnabled = config.isActivityEnabled()
+ ||
"dev".equals(camelContext.getCamelContextExtension().getProfile());
+ tracer.setActivityEnabled(activityEnabled);
camelContext.getCamelContextExtension().addContextPlugin(BacklogTracer.class,
tracer);
camelContext.addService(tracer);
diff --git
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/trace/CamelTraceConfigurationProperties.java
b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/trace/CamelTraceConfigurationProperties.java
index 32574b4305e..48fcd93dcbd 100644
---
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/trace/CamelTraceConfigurationProperties.java
+++
b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/trace/CamelTraceConfigurationProperties.java
@@ -93,6 +93,18 @@ public class CamelTraceConfigurationProperties {
@Metadata(label = "advanced")
private boolean traceTemplates;
+ /**
+ * Whether activity tracking is enabled.
+ */
+ private boolean activityEnabled;
+
+ /**
+ * Number of completed exchange summaries to keep in the activity queue
(should be between 1 - 1000). Default is
+ * 100.
+ */
+ @Metadata(label = "advanced", defaultValue = "100")
+ private int activitySize = 100;
+
/**
* Filter for tracing by route or node id
*/
@@ -199,6 +211,22 @@ public class CamelTraceConfigurationProperties {
this.traceTemplates = traceTemplates;
}
+ public boolean isActivityEnabled() {
+ return activityEnabled;
+ }
+
+ public void setActivityEnabled(boolean activityEnabled) {
+ this.activityEnabled = activityEnabled;
+ }
+
+ public int getActivitySize() {
+ return activitySize;
+ }
+
+ public void setActivitySize(int activitySize) {
+ this.activitySize = activitySize;
+ }
+
public String getTracePattern() {
return tracePattern;
}