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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/// Standard W3C Trace Context `traceparent` header name.
pub const HEADER_TRACEPARENT: &str = "traceparent";
/// Standard W3C Trace Context `tracestate` header name.
pub const HEADER_TRACESTATE: &str = "tracestate";
/// Context attribute key storing the active [`crate::TraceContext`].
pub const ATTR_TRACE_CONTEXT: &str = "hyperlane_plugin_tracing_context";
/// Preformatted internal map key for zero-clone borrowed lookup of [`crate::TraceContext`].
pub const ATTR_TRACE_CONTEXT_MAP_KEY: &str =
"External(\"hyperlane_plugin_tracing_context\")";
/// Preformatted internal map key for zero-clone borrowed lookup of request start `Instant`.
pub const ATTR_TRACE_STARTED_AT_MAP_KEY: &str =
"External(\"hyperlane_plugin_tracing_started_at\")";
/// W3C Trace Context version `00`.
pub const TRACEPARENT_VERSION: &str = "00";
/// Exact byte length of a canonical W3C `traceparent` header value (`00-<32>-<16>-<2>`).
pub const TRACEPARENT_LEN: usize = 55;
/// Invalid W3C `traceparent` version byte (`0xff`).
pub const TRACEPARENT_INVALID_VERSION: u8 = 0xFF;
/// W3C trace flags byte value indicating sampled (`01`).
pub const TRACE_FLAGS_SAMPLED: &str = "01";
/// W3C trace flags byte value indicating not sampled (`00`).
pub const TRACE_FLAGS_UNSAMPLED: &str = "00";
/// Default `Server-Timing` metric label.
pub const DEFAULT_SERVER_TIMING_LABEL: &str = "app";
/// `Server-Timing` duration parameter separator.
pub const SERVER_TIMING_DUR_PREFIX: &str = ";dur=";
/// Stack buffer capacity for formatting `Server-Timing` without heap allocation.
pub const SERVER_TIMING_STACK_CAP: usize = 128;
/// Lowercase hexadecimal alphabet used for fast stack-allocated trace/span formatting.
pub const HEX_DIGITS: & = b"0123456789abcdef";
/// Invalid marker stored in [`HEX_DECODE_TABLE`] for non-hexadecimal bytes.
pub const HEX_INVALID: u8 = 0xFF;
/// Branchless ASCII hexadecimal lookup table mapping `'0'..='9'`, `'a'..='f'`, `'A'..='F'` to `0..=15` and others to `0xFF`.
pub const HEX_DECODE_TABLE: = ;
/// SplitMix64 Weyl increment constant.
pub const SPLITMIX_GAMMA: u64 = 0x9E37_79B9_7F4A_7C15;
/// SplitMix64 first mixing multiplier.
pub const SPLITMIX_MUL1: u64 = 0xBF58_476D_1CE4_E5B9;
/// SplitMix64 second mixing multiplier.
pub const SPLITMIX_MUL2: u64 = 0x94D0_49BB_1331_11EB;