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
//! Process-wide opt-in for payload-bearing span fields.
//!
//! Span verbosity is an operator deployment choice, not a per-call one: it says whether this
//! process's telemetry sink is in scope for the data the process handles. Threading that answer
//! through every host, policy, and HTTP constructor would put a boolean in a dozen signatures to
//! express one fact about the environment, so it lives here as process state instead.
//!
//! It lives in `dekopon-core` rather than `dekopon-telemetry` so the broker, broker host, and HTTP
//! host can consult it without taking a dependency on exporter machinery they otherwise have no
//! reason to link.
//!
//! # What this does and does not widen
//!
//! Enabling payloads adds provider input and output, and HTTP URL paths and queries, to spans.
//! It never unwraps a [`crate::Redacted`] value: that type renders its marker on every path, so a
//! credential stays redacted whichever mode the process runs in. Verbosity is about data the
//! operator has accepted retention for; credentials are not that data.
use ;
static SPAN_PAYLOADS: AtomicBool = new;
/// Enables or disables payload-bearing span fields for this process.
///
/// Call once during startup, before serving. Defaults to disabled, so a process that never calls
/// this emits metadata-only spans.
/// Reports whether payload-bearing span fields are enabled.