From 7e5645e1b9735b0483c7d80e09631c534b8ef876 Mon Sep 17 00:00:00 2001 From: ae2rs Date: Tue, 26 May 2026 09:21:04 +0000 Subject: [PATCH] refactor!: make tracing feature opt-in instead of default The `tracing` feature (which pulls in `tracing`, `tracing-opentelemetry`, and `opentelemetry` crates) is now opt-in rather than included by default. This reduces compile times and dependency count for users who don't need OpenTelemetry trace/span capture. Users who rely on automatic OTel context propagation should add `features = ["tracing"]` to their aerro dependency. BREAKING CHANGE: `tracing` is no longer in the default feature set. Add `features = ["tracing"]` to restore previous behavior. Co-Authored-By: Claude Opus 4.7 (1M context) --- Cargo.toml | 2 +- README.md | 2 +- crates/aerro/Cargo.toml | 4 ++-- crates/aerro/src/lib.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 8fe6ad7..97acab2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,7 +6,7 @@ members = ["crates/aerro", "crates/aerro-macros"] # (Reserved for workspace-wide clippy overrides; currently none.) [workspace.package] -version = "0.7.0" +version = "0.8.0" edition = "2024" rust-version = "1.85" license = "MIT OR Apache-2.0" diff --git a/README.md b/README.md index e5764f7..53f7e04 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ cargo run --example basic --features macro | Flag | Default | Description | |------|---------|-------------| | `macro` | ✓ | `#[derive(Aerro)]` proc-macro | -| `tracing` | ✓ | Capture OTel trace/span IDs from the active `tracing` span | +| `tracing` | ✗ | Capture OTel trace/span IDs from the active `tracing` span | ## Status diff --git a/crates/aerro/Cargo.toml b/crates/aerro/Cargo.toml index a06c3e6..2d82407 100644 --- a/crates/aerro/Cargo.toml +++ b/crates/aerro/Cargo.toml @@ -13,12 +13,12 @@ homepage.workspace = true documentation.workspace = true [features] -default = ["macro", "tracing"] +default = ["macro"] macro = ["dep:aerro-macros"] tracing = ["dep:tracing", "dep:tracing-opentelemetry", "dep:opentelemetry"] [dependencies] -aerro-macros = { path = "../aerro-macros", version = "0.7.0", optional = true } +aerro-macros = { path = "../aerro-macros", version = "0.8.0", optional = true } tonic = { workspace = true } prost = { workspace = true } bytes = { workspace = true } diff --git a/crates/aerro/src/lib.rs b/crates/aerro/src/lib.rs index e0ed88c..71aea2f 100644 --- a/crates/aerro/src/lib.rs +++ b/crates/aerro/src/lib.rs @@ -33,7 +33,7 @@ //! | Flag | Default | Description | //! |------|---------|-------------| //! | `macro` | ✓ | [`Aerro`] derive macro | -//! | `tracing` | ✓ | Capture OTel trace/span IDs via the `tracing` subscriber | +//! | `tracing` | ✗ | Capture OTel trace/span IDs via the `tracing` subscriber | //! # Key Types //! //! - [`Aerro`] — the trait every error type implements (derive or manual)