Skip to main content

hyperlane_plugin_tracing/
lib.rs

1//! hyperlane-plugin-tracing
2//!
3//! Lock-free W3C Trace Context (`traceparent`/`tracestate`), `X-Request-Id`,
4//! `Server-Timing`, and pluggable [`SpanExporter`] distributed tracing plugin
5//! for Hyperlane.
6
7mod r#const;
8mod r#fn;
9mod r#impl;
10mod r#static;
11mod r#struct;
12mod r#trait;
13mod r#type;
14
15#[cfg(test)]
16#[path = "../tests/mod.rs"]
17mod tests;
18
19pub use {r#const::*, r#fn::*, r#struct::*, r#trait::*, r#type::*};
20
21pub(crate) use r#static::*;
22
23use std::{
24    process,
25    str::from_utf8,
26    sync::{
27        Arc, OnceLock,
28        atomic::{AtomicU64, Ordering},
29    },
30    time::{Duration, Instant, SystemTime, UNIX_EPOCH},
31};
32
33use {
34    hyperlane::{
35        ArcAnySendSync, Context, Request, RequestHeadersValue, SERVER_TIMING, ServerHook, Status,
36        Stream, X_REQUEST_ID,
37    },
38    lombok_macros::*,
39};