diff options
author | Alex Auvolat <alex@adnab.me> | 2022-02-24 13:18:51 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-03-14 10:54:12 +0100 |
commit | f869ca625d025d8c52af405392d2081bd81437a8 (patch) | |
tree | b7ad1950afdde2ff9cd6caf1a932a6e5a27c9706 /src/admin | |
parent | 0cc31ee16994d11f4446186c817d8492b0b54f6b (diff) | |
download | garage-f869ca625d025d8c52af405392d2081bd81437a8.tar.gz garage-f869ca625d025d8c52af405392d2081bd81437a8.zip |
Add spans to table calls, change span names in RPC
Diffstat (limited to 'src/admin')
-rw-r--r-- | src/admin/metrics.rs | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/admin/metrics.rs b/src/admin/metrics.rs index 02549fe9..cbc737d3 100644 --- a/src/admin/metrics.rs +++ b/src/admin/metrics.rs @@ -20,8 +20,8 @@ use opentelemetry_prometheus::PrometheusExporter; use prometheus::{Encoder, TextEncoder}; -use garage_util::data::*; use garage_util::error::Error as GarageError; +use garage_util::metrics::*; // serve_req on metric endpoint async fn serve_req( @@ -125,15 +125,9 @@ impl AdminServer { async move { Ok::<_, Infallible>(service_fn(move |req| { let tracer = opentelemetry::global::tracer("garage"); - let uuid = gen_uuid(); let span = tracer .span_builder("admin/request") - .with_trace_id( - opentelemetry::trace::TraceId::from_hex(&hex::encode( - &uuid.as_slice()[..16], - )) - .unwrap(), - ) + .with_trace_id(gen_trace_id()) .start(&tracer); serve_req(req, admin_server.clone()) |