test metrics

This commit is contained in:
houseme
2025-05-16 20:16:43 +08:00
parent 704043ef02
commit fd1bf30de8
4 changed files with 26 additions and 21 deletions
+1 -1
View File
@@ -138,7 +138,7 @@ async fn run(opt: config::Opt) -> Result<()> {
// let local_ip = utils::get_local_ip().ok_or(local_addr.ip()).unwrap();
let local_ip = rustfs_utils::get_local_ip().ok_or(local_addr.ip()).unwrap();
// 用于 rpc
// for rpc
let (endpoint_pools, setup_type) = EndpointServerPools::from_volumes(server_address.clone().as_str(), opt.volumes.clone())
.map_err(|err| Error::from_string(err.to_string()))?;
+3
View File
@@ -26,6 +26,9 @@ pub async fn authorize_request<T>(req: &mut S3Request<T>, action: Action) -> S3R
if let Some(cred) = &req_info.cred {
let Ok(iam_store) = iam::get() else {
let _api_rejected_auth_total_key = rustfs_obs::API_REJECTED_AUTH_TOTAL_MD.get_full_metric_name();
let desc = rustfs_obs::API_REJECTED_AUTH_TOTAL_MD.clone().help;
tracing::info!(api_rejected_auth_total_key = 1_u64, desc);
return Err(S3Error::with_message(
S3ErrorCode::InternalError,
format!("authorize_request {:?}", IamError::IamSysNotInitialized),