add missing netapp telemetry feature

This commit is contained in:
Alex Auvolat
2022-02-22 17:34:46 +01:00
parent dc8d0496cc
commit 0cc31ee169
4 changed files with 168 additions and 21 deletions
+2 -1
View File
@@ -1,7 +1,7 @@
use std::time::Duration;
use opentelemetry::sdk::{
trace::{self, IdGenerator},
trace::{self, IdGenerator, Sampler},
Resource,
};
use opentelemetry::KeyValue;
@@ -24,6 +24,7 @@ pub fn init_tracing(export_to: &str, node_id: Uuid) -> Result<(), Error> {
.with_trace_config(
trace::config()
.with_id_generator(IdGenerator::default())
.with_sampler(Sampler::AlwaysOn)
.with_resource(Resource::new(vec![
KeyValue::new("service.name", "garage"),
KeyValue::new("service.instance.id", node_id),
+1 -1
View File
@@ -48,7 +48,7 @@ opentelemetry = "0.17"
#netapp = { version = "0.3.0", git = "https://git.deuxfleurs.fr/lx/netapp" }
#netapp = { version = "0.4", path = "../../../netapp", features = ["telemetry"] }
netapp = "0.4"
netapp = { version = "0.4", features = ["telemetry"] }
hyper = { version = "0.14", features = ["client", "http1", "runtime", "tcp"] }