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;
13
14#[cfg(test)]
15#[path = "../tests/mod.rs"]
16mod tests;
17
18pub use {r#const::*, r#fn::*, r#struct::*, r#trait::*};
19
20pub(crate) use r#static::*;
21
22use std::{
23    cell::Cell,
24    collections::VecDeque,
25    process,
26    str::from_utf8,
27    sync::{
28        Arc, OnceLock,
29        atomic::{AtomicU64, Ordering},
30    },
31    time::{Duration, Instant, SystemTime, UNIX_EPOCH},
32};
33
34use {
35    hyperlane::{
36        ArcAnySendSync, Context, Request, Response, ResponseHeaders, SERVER_TIMING, ServerHook,
37        Status, Stream, X_REQUEST_ID,
38    },
39    lombok_macros::*,
40};