mirror of
https://github.com/rustfs/rustfs.git
synced 2026-01-17 09:40:32 +00:00
test metrics
This commit is contained in:
@@ -56,6 +56,8 @@ pub use telemetry::init_telemetry;
|
||||
use tokio::sync::Mutex;
|
||||
use tracing::{error, info};
|
||||
|
||||
pub use metrics::request::*;
|
||||
|
||||
/// Initialize the observability module
|
||||
///
|
||||
/// # Parameters
|
||||
|
||||
@@ -1,23 +1,23 @@
|
||||
mod audit;
|
||||
mod bucket;
|
||||
mod bucket_replication;
|
||||
mod cluster_config;
|
||||
mod cluster_erasure_set;
|
||||
mod cluster_health;
|
||||
mod cluster_iam;
|
||||
mod cluster_notification;
|
||||
mod cluster_usage;
|
||||
mod entry;
|
||||
mod ilm;
|
||||
mod logger_webhook;
|
||||
mod replication;
|
||||
mod request;
|
||||
mod scanner;
|
||||
mod system_cpu;
|
||||
mod system_drive;
|
||||
mod system_memory;
|
||||
mod system_network;
|
||||
mod system_process;
|
||||
pub(crate) mod audit;
|
||||
pub(crate) mod bucket;
|
||||
pub(crate) mod bucket_replication;
|
||||
pub(crate) mod cluster_config;
|
||||
pub(crate) mod cluster_erasure_set;
|
||||
pub(crate) mod cluster_health;
|
||||
pub(crate) mod cluster_iam;
|
||||
pub(crate) mod cluster_notification;
|
||||
pub(crate) mod cluster_usage;
|
||||
pub(crate) mod entry;
|
||||
pub(crate) mod ilm;
|
||||
pub(crate) mod logger_webhook;
|
||||
pub(crate) mod replication;
|
||||
pub(crate) mod request;
|
||||
pub(crate) mod scanner;
|
||||
pub(crate) mod system_cpu;
|
||||
pub(crate) mod system_drive;
|
||||
pub(crate) mod system_memory;
|
||||
pub(crate) mod system_network;
|
||||
pub(crate) mod system_process;
|
||||
|
||||
pub use entry::descriptor::MetricDescriptor;
|
||||
pub use entry::metric_name::MetricName;
|
||||
|
||||
@@ -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()))?;
|
||||
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user