Expand description
§Camel Core
This crate provides the core functionality for the Apache Camel implementation in Rust.
§Tracer EIP
The Tracer Enterprise Integration Pattern (EIP) provides automatic message flow tracing throughout your Camel routes. It captures detailed information about each step as messages flow through the integration routes, helping with debugging, monitoring, and observability.
§Configuration
You can configure the tracer in your Camel.toml file:
[observability.tracer]
enabled = true
detail_level = "minimal" # minimal | medium | full
[observability.tracer.outputs.stdout]
enabled = true
format = "json"Or enable it programmatically:
use camel_core::CamelContext;
let mut ctx = CamelContext::new();
ctx.set_tracing(true);§Span Fields
Each trace span includes the following fields:
correlation_id: Unique identifier that links all spans in a single message flowroute_id: Identifier for the route being tracedstep_id: Unique identifier for this specific step in the routestep_index: Sequential index of this step within the routetimestamp: When the step was executed (Unix timestamp)duration_ms: How long the step took to execute in millisecondsstatus: The status of the step execution (e.g., “success”, “error”)
§Detail Levels
The tracer supports three levels of detail:
- Minimal: Includes only the base fields listed above
- Medium: Includes the base fields plus:
headers_count: Number of message headersbody_type: Type of the message bodyhas_error: Whether the message contains an erroroutput_body_type: Type of the output body after processing
- Full: Includes all fields from Minimal and Medium plus:
- Up to 3 message headers (
header_0,header_1,header_2)
- Up to 3 message headers (
§OpenTelemetry Support
OpenTelemetry output is prepared in the configuration types but not yet implemented. It is planned for a future release.
//! Configuration types for the Tracer EIP live in camel-core rather than camel-config
//! to avoid a circular dependency — camel-config depends on camel-core.
Re-exports§
pub use config::DetailLevel;pub use config::FileOutput;pub use config::OpenTelemetryOutput;pub use config::OutputFormat;pub use config::StdoutOutput;pub use config::TracerConfig;pub use config::TracerOutputs;pub use context::CamelContext;pub use registry::Registry;pub use route::Route;pub use route::RouteDefinition;pub use route_controller::DefaultRouteController;pub use route_controller::RouteControllerInternal;pub use supervising_route_controller::SupervisingRouteController;pub use tracer::TracingProcessor;
Modules§
- config
- context
- registry
- reload
- Route reload coordinator.
- reload_
watcher - File-watching hot-reload loop.
- route
- route_
controller - Default implementation of RouteController.
- supervising_
route_ controller - Supervising route controller with automatic crash recovery.
- tracer
Enums§
- Route
Action - Represents actions that can be performed on a route.
- Route
Status - Represents the current lifecycle status of a route.
Traits§
- Route
Controller - Trait for managing route lifecycle operations.