Cargo.toml (3137B)
1 [workspace] 2 resolver = "2" 3 members = ["otelmart", "products", "inventory", "orders"] 4 5 [workspace.package] 6 version = "0.1.0" 7 edition = "2021" 8 authors = ["OpenTel Book Team"] 9 license = "MIT OR Apache-2.0" 10 11 [workspace.lints.clippy] 12 # Pedantic lints for better code quality 13 pedantic = { level = "warn", priority = -1 } 14 # Allow some pedantic lints that are too noisy 15 module_name_repetitions = "allow" 16 missing_errors_doc = "allow" 17 missing_panics_doc = "allow" 18 must_use_candidate = "allow" 19 20 # Style preferences 21 enum_glob_use = "warn" 22 unwrap_used = "warn" 23 expect_used = "warn" 24 25 # Correctness 26 semicolon_if_nothing_returned = "warn" 27 inconsistent_struct_constructor = "warn" 28 29 [workspace.dependencies] 30 # Web framework 31 axum = "0.8.7" 32 tokio = { version = "1.48.0", features = ["full"] } 33 tower = "0.5.2" 34 tower-http = { version = "0.6.6", features = ["cors"] } 35 36 # Database 37 sqlx = { version = "0.8.6", features = [ 38 "runtime-tokio-rustls", 39 "postgres", 40 "chrono", 41 "uuid", 42 "json", 43 "migrate", 44 "bigdecimal", 45 "migrate", 46 ] } 47 48 # Redis 49 redis = { version = "0.32.7", features = ["tokio-comp", "connection-manager"] } 50 51 # Serialization 52 serde = { version = "1.0.228", features = ["derive"] } 53 serde_json = "1.0.145" 54 55 # Utilities 56 chrono = { version = "0.4.42", features = ["serde"] } 57 uuid = { version = "1.18.1", features = ["v4", "serde"] } 58 rust_decimal = { version = "1.39.0", features = ["serde"] } 59 bigdecimal = { version = "0.4.9", features = ["serde"] } 60 anyhow = "1.0.100" 61 thiserror = "2.0.17" 62 63 # Configuration 64 toml = "0.9.8" 65 config = "0.14" 66 dotenvy = "0.15" 67 68 # HTTP client 69 reqwest = { version = "0.13.4", features = ["json"] } 70 71 # Security 72 bcrypt = "0.15" 73 jsonwebtoken = "9" 74 75 # URL encoding 76 urlencoding = "2" 77 78 # Random number generation 79 rand = "0.9.2" 80 81 # Telemetry / Observability 82 # 83 # Core tracing ecosystem 84 tracing = "0.1.44" 85 tracing-subscriber = { version = "0.3.22", features = ["env-filter", "json"] } 86 87 # OpenTelemetry core 88 opentelemetry = "0.32.0" 89 opentelemetry_sdk = { version = "0.32.1", features = [ 90 "rt-tokio", # Tokio runtime support 91 "metrics", # Metrics support 92 "logs", # Logs support 93 ] } 94 opentelemetry-appender-tracing = "0.32.0" 95 96 # OTLP exporter (sends traces to collectors/backends) 97 opentelemetry-otlp = { version = "0.32.0", default-features = false, features = [ 98 "grpc-tonic", # gRPC for traces 99 "http-proto", # HTTP transport for metrics and Logs exporters 100 "reqwest-blocking-client", # HTTP client implementation 101 "trace", # Traces export 102 "metrics", # Metrics export 103 "logs", # Logs export 104 "internal-logs", # Internal logs export 105 ] } 106 107 # Bridge between tracing and OpenTelemetry 108 tracing-opentelemetry = "0.33.0" 109 110 # HTTP instrumentation (server + client) 111 axum-tracing-opentelemetry = "0.38.0" 112 reqwest-middleware = { version = "0.5.2", features = ["json"] } 113 reqwest-tracing = { version = "0.7.1", features = ["opentelemetry_0_32"] } 114 axum-otel-metrics = "0.14.1" 115 116 # Hash utils 117 hex = "0.4.3" 118 sha2 = "0.11.0" 119 120 [profile.release] 121 opt-level = 3 122 lto = true 123 codegen-units = 1 124 strip = true 125 126 [profile.dev] 127 opt-level = 0 128 debug = true