diff --git a/Cargo.toml b/Cargo.toml index cca7eea1..c2552c3f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -11,7 +11,7 @@ members = [ resolver = "3" [workspace.package] -version = "5.10.3" +version = "5.11.0" repository = "https://github.com/cloudflare/foundations" edition = "2024" authors = ["Cloudflare"] @@ -42,10 +42,10 @@ check-cfg = [ [workspace.dependencies] anyhow = "1.0.102" backtrace = "0.3.76" -foundations = { version = "5.10.3", path = "./foundations", default-features = false } -foundations-macros = { version = "=5.10.3", path = "./foundations-macros", default-features = false } +foundations = { version = "5.11.0", path = "./foundations", default-features = false } +foundations-macros = { version = "=5.11.0", path = "./foundations-macros", default-features = false } foundations-metrics-registry = { version = "1.0.0", path = "./foundations-metrics-registry", default-features = false } -foundations-metrics = { version = "0.1.0-beta.3", path = "./foundations-metrics", default-features = false } +foundations-metrics = { version = "0.1.0-beta.4", path = "./foundations-metrics", default-features = false } bindgen = { version = "0.72.1", default-features = false } cc = "1.2.61" cf-rustracing = "1.4.1" diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index c98d0f98..7da8fc29 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,4 +1,14 @@ +5.11.0 +- 2026-10-09 feat(telemetry): skip RwLock for unsampled SharedSpanHandles +- 2026-10-09 refactor(telemetry): share user span sampling state between handles +- 2026-10-08 feat(telemetry): discard user spans +- 2026-10-08 chore(deps): bump cf-rustracing to 1.4.1 +- 2026-10-08 feat(telemetry): set start and finish times on user spans +- 2026-10-08 metrics: Add LowCardinalityFamily and associated #[metric] logic +- 2026-10-08 fix: libc 0.2.190 breaks semver +- 2026-10-08 fix: Rust 1.99 lints + 5.10.3 - 2026-09-29 fix: clippy and rustc lints in span_with_probe example - 2026-09-29 feat(telemetry): drop duplicate args_len information from SpanProbe diff --git a/foundations-metrics/Cargo.toml b/foundations-metrics/Cargo.toml index 32873fb0..06360e90 100644 --- a/foundations-metrics/Cargo.toml +++ b/foundations-metrics/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "foundations-metrics" description = "Metric types and encoders for the Foundations stack." -version = "0.1.0-beta.3" +version = "0.1.0-beta.4" readme = "README.md" repository = { workspace = true } edition = { workspace = true } diff --git a/foundations-metrics/RELEASE_NOTES.md b/foundations-metrics/RELEASE_NOTES.md index 0ec0e573..456e57de 100644 --- a/foundations-metrics/RELEASE_NOTES.md +++ b/foundations-metrics/RELEASE_NOTES.md @@ -1,5 +1,9 @@ -0.1.0-beta.3 +0.1.0-beta.4 +- 2026-10-08 metrics: Add LowCardinalityFamily and associated #[metric] logic + +foundations-metrics-v0.1.0-beta.3 +- 2026-08-26 Release 5.9.2 (#259) - 2026-08-26 fix(metrics): terminate classic histogram buckets with +Inf - 2026-08-18 feat(metrics): expose max_zero_threshold on NativeHistogramBuilder - 2026-08-17 feat(metrics): let native histograms recover lost resolution diff --git a/foundations/src/telemetry/tracing/internal.rs b/foundations/src/telemetry/tracing/internal.rs index ea220a23..42b65abc 100644 --- a/foundations/src/telemetry/tracing/internal.rs +++ b/foundations/src/telemetry/tracing/internal.rs @@ -65,11 +65,15 @@ impl SharedSpanHandle { static INACTIVE: Span = Span::inactive(); match self { - SharedSpanHandle::Tracked { span, .. } => f(&span.read()), + SharedSpanHandle::Tracked { span, is_sampled } if *is_sampled => f(&span.read()), SharedSpanHandle::Untracked(rw_lock) => f(&rw_lock.read()), #[cfg(feature = "user-tracing")] - SharedSpanHandle::User(slot) | SharedSpanHandle::Deferred(slot) => f(&slot.span.read()), - SharedSpanHandle::Inactive => f(&INACTIVE), + SharedSpanHandle::User(slot) | SharedSpanHandle::Deferred(slot) + if slot.is_sampled() => + { + f(&slot.span.read()) + } + _ => f(&INACTIVE), } } @@ -79,13 +83,15 @@ impl SharedSpanHandle { /// can't substitute a shared placeholder. pub(crate) fn with_write(&self, f: impl FnOnce(&mut Span)) { match self { - SharedSpanHandle::Tracked { span, .. } => f(&mut span.write()), + SharedSpanHandle::Tracked { span, is_sampled } if *is_sampled => f(&mut span.write()), SharedSpanHandle::Untracked(rw_lock) => f(&mut rw_lock.write()), #[cfg(feature = "user-tracing")] - SharedSpanHandle::User(slot) | SharedSpanHandle::Deferred(slot) => { + SharedSpanHandle::User(slot) | SharedSpanHandle::Deferred(slot) + if slot.is_sampled() => + { f(&mut slot.span.write()) } - SharedSpanHandle::Inactive => {} + _ => {} } } }