From 8c2fb0c066af7f68fdcfcdec96fa030af059bf63 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Thu, 17 Feb 2022 23:28:23 +0100 Subject: Add tracing integration with opentelemetry --- src/util/Cargo.toml | 2 +- src/util/config.rs | 2 ++ src/util/lib.rs | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src/util') diff --git a/src/util/Cargo.toml b/src/util/Cargo.toml index 4e3c8c25..3cc2031d 100644 --- a/src/util/Cargo.toml +++ b/src/util/Cargo.toml @@ -18,7 +18,7 @@ blake2 = "0.9" err-derive = "0.3" xxhash-rust = { version = "0.8", default-features = false, features = ["xxh3"] } hex = "0.4" -log = "0.4" +tracing = "0.1.30" rand = "0.8" sha2 = "0.9" diff --git a/src/util/config.rs b/src/util/config.rs index 2d15748f..e763fcd5 100644 --- a/src/util/config.rs +++ b/src/util/config.rs @@ -104,6 +104,8 @@ pub struct WebConfig { pub struct AdminConfig { /// Address and port to bind for admin API serving pub bind_addr: SocketAddr, + /// OTLP server to where to export traces + pub otlp_export_traces_to: Option, } fn default_sled_cache_capacity() -> u64 { diff --git a/src/util/lib.rs b/src/util/lib.rs index 64874095..6856f656 100644 --- a/src/util/lib.rs +++ b/src/util/lib.rs @@ -1,7 +1,7 @@ //! Crate containing common functions and types used in Garage #[macro_use] -extern crate log; +extern crate tracing; pub mod background; pub mod config; -- cgit v1.2.3