fix: harden typed metrics review findings

This commit is contained in:
2026-08-14 13:50:04 +03:00
parent 996a5461de
commit b7face0e94
30 changed files with 722 additions and 382 deletions
+5
View File
@@ -183,6 +183,11 @@ impl TraceContext {
&self.traceparent
}
/// Whether this context was selected for recording by the upstream/local sampler.
pub fn is_sampled(&self) -> bool {
self.traceparent.ends_with("-01")
}
pub fn tracestate_within_budget(value: &str) -> bool {
header_list_within_budget(
value,