mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-04 14:04:40 -04:00
chore: Update the ByteSize crate version we're using
This commit is contained in:
4
Cargo.lock
generated
4
Cargo.lock
generated
@@ -620,9 +620,9 @@ checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b"
|
||||
|
||||
[[package]]
|
||||
name = "bytesize"
|
||||
version = "1.3.0"
|
||||
version = "2.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a3e368af43e418a04d52505cf3dbc23dda4e3407ae2fa99fd0e4f308ce546acc"
|
||||
checksum = "a3c8f83209414aacf0eeae3cf730b18d6981697fba62f200fcfb92b9f082acba"
|
||||
|
||||
[[package]]
|
||||
name = "camino"
|
||||
|
||||
@@ -60,7 +60,7 @@ async-stream = { workspace = true }
|
||||
async-trait = { workspace = true }
|
||||
axum = { version = "0.8.1", optional = true }
|
||||
bytes = "1.9.0"
|
||||
bytesize = "1.3.0"
|
||||
bytesize = "2.0.1"
|
||||
event-listener = "5.4.0"
|
||||
eyeball = { workspace = true }
|
||||
eyeball-im = { workspace = true }
|
||||
|
||||
@@ -204,7 +204,10 @@ impl HttpClient {
|
||||
// in conjunction with request bodies
|
||||
if [Method::POST, Method::PUT, Method::PATCH].contains(method) {
|
||||
let request_size = request.body().len().try_into().unwrap_or(u64::MAX);
|
||||
span.record("request_size", ByteSize(request_size).to_string_as(true));
|
||||
span.record(
|
||||
"request_size",
|
||||
ByteSize(request_size).display().si_short().to_string(),
|
||||
);
|
||||
}
|
||||
|
||||
request
|
||||
|
||||
@@ -94,7 +94,7 @@ impl HttpClient {
|
||||
let response_size = ByteSize(response.body().len().try_into().unwrap_or(u64::MAX));
|
||||
tracing::Span::current()
|
||||
.record("status", status_code.as_u16())
|
||||
.record("response_size", response_size.to_string_as(true));
|
||||
.record("response_size", response_size.display().si_short().to_string());
|
||||
|
||||
// Record interesting headers. If you add more headers, ensure they're not
|
||||
// confidential.
|
||||
|
||||
@@ -42,7 +42,7 @@ impl HttpClient {
|
||||
let response_size = ByteSize(response.body().len().try_into().unwrap_or(u64::MAX));
|
||||
tracing::Span::current()
|
||||
.record("status", status_code.as_u16())
|
||||
.record("response_size", response_size.to_string_as(true));
|
||||
.record("response_size", response_size.display().si_short().to_string());
|
||||
|
||||
Ok(R::IncomingResponse::try_from_http_response(response)?)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user