1use tracing::Span;
2
3pub trait Instrument: Sized {
4 fn instrument(self, _span: Span) -> Self {
5 self
6 }
7
8 fn in_current_span(self) -> Self {
9 self
10 }
11}
12
13impl<T> Instrument for T {}
14
15#[macro_export]
16macro_rules! event {
17 ($($args:tt)*) => {
18 if false {
19 $crate::__tracing::event!($($args)*);
20 }
21 };
22}
23
24#[macro_export]
25macro_rules! error {
26 ($($args:tt)*) => {
27 if false {
28 $crate::__tracing::error!($($args)*);
29 }
30 };
31}
32
33#[macro_export]
34macro_rules! warn {
35 ($($args:tt)*) => {
36 if false {
37 $crate::__tracing::warn!($($args)*);
38 }
39 };
40}
41
42#[macro_export]
43macro_rules! info {
44 ($($args:tt)*) => {
45 if false {
46 $crate::__tracing::info!($($args)*);
47 }
48 };
49}
50
51#[macro_export]
52macro_rules! debug {
53 ($($args:tt)*) => {
54 if false {
55 $crate::__tracing::debug!($($args)*);
56 }
57 };
58}
59
60#[macro_export]
61macro_rules! trace {
62 ($($args:tt)*) => {
63 if false {
64 $crate::__tracing::trace!($($args)*);
65 }
66 };
67}
68
69#[macro_export]
70macro_rules! span {
71 ($($args:tt)*) => {{
72 if false {
73 $crate::__tracing::span!($($args)*)
74 } else {
75 $crate::Span::none()
76 }
77 }};
78}
79
80#[macro_export]
81macro_rules! error_span {
82 ($($args:tt)*) => {
83 if false {
84 $crate::__tracing::error_span!($($args)*)
85 } else {
86 $crate::Span::none()
87 }
88 };
89}
90
91#[macro_export]
92macro_rules! warn_span {
93 ($($args:tt)*) => {
94 if false {
95 $crate::__tracing::warn_span!($($args)*)
96 } else {
97 $crate::Span::none()
98 }
99 };
100}
101
102#[macro_export]
103macro_rules! info_span {
104 ($($args:tt)*) => {
105 if false {
106 $crate::__tracing::info_span!($($args)*)
107 } else {
108 $crate::Span::none()
109 }
110 };
111}
112
113#[macro_export]
114macro_rules! debug_span {
115 ($($args:tt)*) => {
116 if false {
117 $crate::__tracing::debug_span!($($args)*)
118 } else {
119 $crate::Span::none()
120 }
121 };
122}
123
124#[macro_export]
125macro_rules! trace_span {
126 ($($args:tt)*) => {
127 if false {
128 $crate::__tracing::trace_span!($($args)*)
129 } else {
130 $crate::Span::none()
131 }
132 };
133}