mirror of
https://github.com/astro/buzzrelay.git
synced 2024-11-21 19:51:00 +00:00
send: remove host facet from tracing histogram
This commit is contained in:
parent
3a42090e0c
commit
186d9f008e
1 changed files with 2 additions and 2 deletions
|
@ -51,10 +51,10 @@ pub async fn send_raw(
|
||||||
let t3 = Instant::now();
|
let t3 = Instant::now();
|
||||||
histogram!("relay_http_request_duration", t2 - t1);
|
histogram!("relay_http_request_duration", t2 - t1);
|
||||||
if res.status() >= StatusCode::OK && res.status() < StatusCode::MULTIPLE_CHOICES {
|
if res.status() >= StatusCode::OK && res.status() < StatusCode::MULTIPLE_CHOICES {
|
||||||
histogram!("relay_http_response_duration", t3 - t2, "res" => "ok", "host" => host);
|
histogram!("relay_http_response_duration", t3 - t2, "res" => "ok");
|
||||||
Ok(())
|
Ok(())
|
||||||
} else {
|
} else {
|
||||||
histogram!("relay_http_response_duration", t3 - t2, "res" => "err", "host" => host);
|
histogram!("relay_http_response_duration", t3 - t2, "res" => "err");
|
||||||
let response = res.text().await?;
|
let response = res.text().await?;
|
||||||
Err(Error::Response(response))
|
Err(Error::Response(response))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue