aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/consul.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-02-17 23:28:23 +0100
committerAlex Auvolat <alex@adnab.me>2022-03-14 10:52:13 +0100
commit8c2fb0c066af7f68fdcfcdec96fa030af059bf63 (patch)
tree58a416058e31eda2cdb3a15c07e565a9ad674857 /src/rpc/consul.rs
parentb6561f6e1bcb6a8de13a186405a480e356df89d8 (diff)
downloadgarage-8c2fb0c066af7f68fdcfcdec96fa030af059bf63.tar.gz
garage-8c2fb0c066af7f68fdcfcdec96fa030af059bf63.zip
Add tracing integration with opentelemetry
Diffstat (limited to 'src/rpc/consul.rs')
-rw-r--r--src/rpc/consul.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rpc/consul.rs b/src/rpc/consul.rs
index 82bf99ba..e70288dd 100644
--- a/src/rpc/consul.rs
+++ b/src/rpc/consul.rs
@@ -139,10 +139,10 @@ pub async fn publish_consul_service(
let resp = client.request(req).await?;
debug!("Response of advertising to Consul: {:?}", resp);
let resp_code = resp.status();
+ let resp_bytes = &hyper::body::to_bytes(resp.into_body()).await?;
debug!(
"{}",
- std::str::from_utf8(&hyper::body::to_bytes(resp.into_body()).await?)
- .unwrap_or("<invalid utf8>")
+ std::str::from_utf8(resp_bytes).unwrap_or("<invalid utf8>")
);
if resp_code != StatusCode::OK {