Skip to content

Enable simple tracer standby in dev profile#23415

Merged
gnodet merged 1 commit into
apache:mainfrom
gnodet:glossy-push
May 21, 2026
Merged

Enable simple tracer standby in dev profile#23415
gnodet merged 1 commit into
apache:mainfrom
gnodet:glossy-push

Conversation

@gnodet
Copy link
Copy Markdown
Contributor

@gnodet gnodet commented May 21, 2026

Summary

  • Enable simple log tracer standby (tracingStandby) in dev profile, matching how backlog tracer standby is already auto-enabled
  • Users can now toggle log-based tracing on/off at runtime in dev mode without restarting (camel run or Camel Main)
  • Add tests verifying dev profile standby behavior
  • Document the automatic standby in tracer.adoc

Background

The --trace flag for camel run must be specified at launch time because TracingAdvice interceptors are woven into route processor chains only during route initialization. Without standby mode, there is no way to toggle tracing on at runtime.

The backlog tracer already had standby auto-enabled in dev profile (ProfileConfigurer.java), but the simple log tracer (what --trace controls) was missed.

Test plan

  • MainDevProfileTracingStandbyTest.testDevProfileEnablesTracingStandby — verifies dev profile sets tracingStandby=true
  • MainDevProfileTracingStandbyTest.testDevProfileTracingCanBeEnabledAtRuntime — verifies tracer can be toggled on at runtime
  • MainDevProfileTracingStandbyTest.testProdProfileDoesNotEnableTracingStandby — verifies prod profile does not set standby
  • Existing TracingStandbyTest and TracingStandbyNoRouteTest still pass

The backlog tracer already had standby auto-enabled in dev mode, but the
simple log tracer (controlled by --trace) did not. This meant users had
to restart with --trace to get log-based tracing, even during
development.

Now both tracers are in standby mode in the dev profile, so tracing can
be toggled on at runtime via Tracer.setEnabled(true) or JMX without
restarting.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gnodet gnodet requested review from davsclaus and oscerd May 21, 2026 10:10
@davsclaus
Copy link
Copy Markdown
Contributor

btw there is always in dev mode included the last traced message its in the history dev console. So you can ask the AI what happened with the message inside camel

the tracing captures and remember in a backlog so you can view older traces.

@github-actions
Copy link
Copy Markdown
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@github-actions
Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • core/camel-main
  • docs

ℹ️ Dependent modules were not tested because the total number of affected modules exceeded the threshold (50). Use the test-dependents label to force testing all dependents.

Build reactor — dependencies compiled but only changed modules were tested (2 modules)
  • Camel :: Docs
  • Camel :: Main

⚙️ View full build and test results

@gnodet gnodet merged commit 4abe848 into apache:main May 21, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants