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 (
//! 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 crate::lifecycle::domain::RouteLifecycleCommand;pub use crate::lifecycle::domain::RouteRuntimeAggregate;pub use crate::lifecycle::domain::RouteRuntimeState;pub use crate::lifecycle::domain::RuntimeEvent;pub use context::CamelContext;
Modules§
Structs§
- Default
Route Controller - Default implementation of
RouteController. - File
Output - File
Runtime Event Journal - InMemory
Command Dedup - InMemory
Event Publisher - InMemory
Projection Store - InMemory
Route Repository - InMemory
Runtime Store - Registry
- Registry that stores components by their URI scheme.
- Reload
Watcher - Route
- A Route defines a message flow: from a source endpoint, through a composed Tower Service pipeline.
- Route
Definition - An unresolved route definition. “to” URIs have not been resolved to producers yet.
- Route
Status Projection - Runtime
Bus - Runtime
Execution Adapter - Runtime side-effect adapter backed by the technical route controller.
- Stdout
Output - Supervising
Route Controller - A route controller that automatically restarts crashed routes.
- Tracer
Config - Configuration for the Tracer EIP (Enterprise Integration Pattern).
- Tracer
Outputs - Tracing
Processor - A processor wrapper that emits tracing spans for each step.
Enums§
- Builder
Step - A step in an unresolved route definition.
- Camel
Error - Core error type for the Camel framework.
- Detail
Level - Controls the level of detail captured in trace spans.
- Output
Format - Route
Action - Represents actions that can be performed on a route.
- Route
Status - Represents the current lifecycle status of a route.
Traits§
- Command
Dedup Port - Event
Publisher Port - Projection
Store Port - Route
Controller - Trait for managing route lifecycle operations.
- Route
Repository Port - Runtime
Event Journal Port - Runtime
Execution Port - Runtime
Unit OfWork Port