pub fn init_logging_with_otel<L, S>(
_config: LoggingConfig,
_otel_layer: L,
) -> Result<(), Box<dyn Error + Send + Sync>>Expand description
Initialize logging with OpenTelemetry tracing layer
This function sets up logging with an additional OpenTelemetry layer for distributed tracing.
§Arguments
config- Logging configurationotel_layer- OpenTelemetry tracing layer
§Example
use mockforge_observability::logging::{LoggingConfig, init_logging_with_otel};
use tracing_subscriber::layer::SubscriberExt;
// Initialize OpenTelemetry tracer first
// let tracer = ...;
// let otel_layer = tracing_opentelemetry::layer().with_tracer(tracer);
// Then initialize logging with the layer
// init_logging_with_otel(config, otel_layer).expect("Failed to initialize logging");