mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-06 05:17:42 +00:00
add tracing
This commit is contained in:
@@ -14,6 +14,7 @@ pub struct ListPools {}
|
||||
#[async_trait::async_trait]
|
||||
impl Operation for ListPools {
|
||||
// GET <endpoint>/<admin-API>/pools/list
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn call(&self, _req: S3Request<Body>, _params: Params<'_, '_>) -> S3Result<S3Response<(StatusCode, Body)>> {
|
||||
warn!("handle ListPools");
|
||||
|
||||
@@ -60,6 +61,7 @@ pub struct StatusPool {}
|
||||
#[async_trait::async_trait]
|
||||
impl Operation for StatusPool {
|
||||
// GET <endpoint>/<admin-API>/pools/status?pool=http://server{1...4}/disk{1...4}
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn call(&self, req: S3Request<Body>, _params: Params<'_, '_>) -> S3Result<S3Response<(StatusCode, Body)>> {
|
||||
warn!("handle StatusPool");
|
||||
|
||||
@@ -122,6 +124,7 @@ pub struct StartDecommission {}
|
||||
#[async_trait::async_trait]
|
||||
impl Operation for StartDecommission {
|
||||
// POST <endpoint>/<admin-API>/pools/decommission?pool=http://server{1...4}/disk{1...4}
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn call(&self, req: S3Request<Body>, _params: Params<'_, '_>) -> S3Result<S3Response<(StatusCode, Body)>> {
|
||||
warn!("handle StartDecommission");
|
||||
|
||||
@@ -204,6 +207,7 @@ pub struct CancelDecommission {}
|
||||
#[async_trait::async_trait]
|
||||
impl Operation for CancelDecommission {
|
||||
// POST <endpoint>/<admin-API>/pools/cancel?pool=http://server{1...4}/disk{1...4}
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn call(&self, req: S3Request<Body>, _params: Params<'_, '_>) -> S3Result<S3Response<(StatusCode, Body)>> {
|
||||
warn!("handle CancelDecommission");
|
||||
|
||||
|
||||
@@ -63,6 +63,7 @@ pub struct RebalanceStart {}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
impl Operation for RebalanceStart {
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn call(&self, _req: S3Request<Body>, _params: Params<'_, '_>) -> S3Result<S3Response<(StatusCode, Body)>> {
|
||||
warn!("handle RebalanceStart");
|
||||
|
||||
@@ -118,6 +119,7 @@ pub struct RebalanceStatus {}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
impl Operation for RebalanceStatus {
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn call(&self, _req: S3Request<Body>, _params: Params<'_, '_>) -> S3Result<S3Response<(StatusCode, Body)>> {
|
||||
warn!("handle RebalanceStatus");
|
||||
|
||||
@@ -213,6 +215,7 @@ pub struct RebalanceStop {}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
impl Operation for RebalanceStop {
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn call(&self, _req: S3Request<Body>, _params: Params<'_, '_>) -> S3Result<S3Response<(StatusCode, Body)>> {
|
||||
warn!("handle RebalanceStop");
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ use mime_guess::from_path;
|
||||
use rust_embed::RustEmbed;
|
||||
use serde::Serialize;
|
||||
use shadow_rs::shadow;
|
||||
use std::net::{IpAddr, Ipv4Addr, SocketAddr};
|
||||
use std::net::{Ipv4Addr, SocketAddr};
|
||||
use std::sync::OnceLock;
|
||||
use std::time::Duration;
|
||||
use tokio::signal;
|
||||
|
||||
@@ -2374,6 +2374,7 @@ impl Node for NodeService {
|
||||
}))
|
||||
}
|
||||
|
||||
#[tracing::instrument(skip_all)]
|
||||
async fn load_rebalance_meta(
|
||||
&self,
|
||||
request: Request<LoadRebalanceMetaRequest>,
|
||||
|
||||
Reference in New Issue
Block a user