mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-30 08:49:26 +00:00
fix(obs): Remove high cardinality label on rustfs_api_requests_total (#2087)
Co-authored-by: loverustfs <hello@rustfs.com>
This commit is contained in:
@@ -665,10 +665,7 @@ fn process_connection(
|
|||||||
.on_request(|request: &HttpRequest<_>, span: &Span| {
|
.on_request(|request: &HttpRequest<_>, span: &Span| {
|
||||||
let _enter = span.enter();
|
let _enter = span.enter();
|
||||||
debug!("http started method: {}, url path: {}", request.method(), request.uri().path());
|
debug!("http started method: {}, url path: {}", request.method(), request.uri().path());
|
||||||
let labels = [
|
let labels = [("key_request_method", request.method().to_string())];
|
||||||
("key_request_method", format!("{}", request.method())),
|
|
||||||
("key_request_uri_path", request.uri().path().to_owned().to_string()),
|
|
||||||
];
|
|
||||||
counter!("rustfs.api.requests.total", &labels).increment(1);
|
counter!("rustfs.api.requests.total", &labels).increment(1);
|
||||||
})
|
})
|
||||||
.on_response(|response: &Response<_>, latency: Duration, span: &Span| {
|
.on_response(|response: &Response<_>, latency: Duration, span: &Span| {
|
||||||
|
|||||||
Reference in New Issue
Block a user