Skip to content

Commit

Permalink
Add ExporterInner
Browse files Browse the repository at this point in the history
  • Loading branch information
aqrln committed Nov 20, 2024
1 parent 56e7622 commit 6b50803
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions libs/telemetry/src/capturing/ng/collector.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::{borrow::Cow, collections::HashMap, num::NonZeroU64};
use std::{borrow::Cow, collections::HashMap, num::NonZeroU64, sync::Arc};

use serde::Serialize;
use tokio::time::Instant;
Expand Down Expand Up @@ -149,11 +149,16 @@ pub trait Collector {
fn add_event(&self, trace: SpanId, event: CollectedEvent);
}

pub struct Exporter {}
#[derive(Clone)]
pub struct Exporter(Arc<ExporterInner>);

struct ExporterInner {
tasks: HashMap<SpanId, ()>,
}

impl Exporter {
pub fn new() -> Self {
Self {}
Self(Arc::new(ExporterInner { tasks: HashMap::new() }))
}
}

Expand Down

0 comments on commit 6b50803

Please sign in to comment.