1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//! # Observability Module
//!
//! This module provides comprehensive observability features including:
//!
//! - **Structured Logging**: Context-aware logging with multiple output formats
//! - **Metrics Collection**: Counters, gauges, histograms for performance monitoring
//! - **Tracing Support**: Integration with the tracing ecosystem
//! - **Request Tracing IDs**: Automatic generation and propagation of trace IDs
//!
//! ## Features
//!
//! - Thread-safe metrics and logging
//! - Prometheus-compatible metrics export
//! - JSON and text log formats
//! - Timer utilities for measuring code execution time
//! - Structured spans for SDK operations
//!
//! ## Example
//!
//! ```no_run
//! use claude_agent_sdk::observability::{Logger, MetricsCollector, init_tracing, TracingConfig};
//!
//! // Initialize tracing at startup
//! init_tracing(TracingConfig::production());
//!
//! let logger = Logger::new("MyAgent");
//! let metrics = MetricsCollector::new();
//!
//! logger.info("Starting agent execution", &[("task_id", "123")]);
//!
//! let _timer = metrics.start_timer("agent_execution", &[("agent", "researcher")]);
//! // ... do work ...
//! // Timer automatically recorded on drop
//! ```
// Re-export commonly used types
pub use ;
pub use ;
pub use ;