Skip to content

Commit a914cb9

Browse files
committed
fix: Correct an issue resulting in OTel exports to crash
1 parent 42b0ac0 commit a914cb9

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

src/main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ use pairing::PairingHandler;
55
use std::sync::atomic::AtomicBool;
66
use std::time::Duration;
77
use tracing_batteries::prelude::*;
8+
use tracing_batteries::{OpenTelemetry, Session};
89

910
#[macro_use]
1011
mod macros;
@@ -160,7 +161,8 @@ async fn main() {
160161

161162
let args = Args::parse();
162163

163-
let session = telemetry::setup();
164+
let session = Session::new("github-backup", version!())
165+
.with_battery(OpenTelemetry::new(""));
164166

165167
let result = run(args).await;
166168

src/telemetry/mod.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
11
mod traced_stream;
22

33
pub use traced_stream::*;
4-
5-
use tracing_batteries::*;
6-
7-
pub fn setup() -> Session {
8-
Session::new("github-backup", version!())
9-
.with_battery(OpenTelemetry::new("").with_protocol(OpenTelemetryProtocol::HttpJson))
10-
}

0 commit comments

Comments
 (0)