|
1 | 1 | // Note that all tests here should be marked as ignore so that it won't be picked up by default We
|
2 | 2 | // need to run those tests one by one as the GlobalTracerProvider is a shared object between
|
3 | 3 | // threads Use cargo test -- --ignored --test-threads=1 to run those tests.
|
| 4 | +#[cfg(any(feature = "rt-tokio", feature = "rt-tokio-current-thread"))] |
4 | 5 | use crate::export::trace::{ExportResult, SpanExporter};
|
5 | 6 | #[cfg(any(feature = "rt-tokio", feature = "rt-tokio-current-thread"))]
|
6 | 7 | use crate::runtime;
|
7 | 8 | #[cfg(any(feature = "rt-tokio", feature = "rt-tokio-current-thread"))]
|
8 | 9 | use crate::runtime::RuntimeChannel;
|
| 10 | +#[cfg(any(feature = "rt-tokio", feature = "rt-tokio-current-thread"))] |
9 | 11 | use futures_util::future::BoxFuture;
|
10 | 12 | #[cfg(any(feature = "rt-tokio", feature = "rt-tokio-current-thread"))]
|
11 | 13 | use opentelemetry::global::*;
|
12 | 14 | #[cfg(any(feature = "rt-tokio", feature = "rt-tokio-current-thread"))]
|
13 | 15 | use opentelemetry::trace::Tracer;
|
| 16 | +#[cfg(any(feature = "rt-tokio", feature = "rt-tokio-current-thread"))] |
14 | 17 | use std::fmt::Debug;
|
| 18 | +#[cfg(any(feature = "rt-tokio", feature = "rt-tokio-current-thread"))] |
15 | 19 | use std::sync::atomic::{AtomicUsize, Ordering};
|
| 20 | +#[cfg(any(feature = "rt-tokio", feature = "rt-tokio-current-thread"))] |
16 | 21 | use std::sync::Arc;
|
17 | 22 |
|
18 | 23 | #[derive(Debug)]
|
| 24 | +#[cfg(any(feature = "rt-tokio", feature = "rt-tokio-current-thread"))] |
19 | 25 | struct SpanCountExporter {
|
20 | 26 | span_count: Arc<AtomicUsize>,
|
21 | 27 | }
|
22 | 28 |
|
| 29 | +#[cfg(any(feature = "rt-tokio", feature = "rt-tokio-current-thread"))] |
23 | 30 | impl SpanExporter for SpanCountExporter {
|
24 | 31 | fn export(
|
25 | 32 | &mut self,
|
|
0 commit comments