mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-16 09:58:21 +00:00
feat: add hotpath observability for S3 data paths (#5860)
This commit is contained in:
@@ -382,6 +382,7 @@ impl DefaultMultipartUsecase {
|
||||
}
|
||||
|
||||
#[instrument(level = "debug", skip(self, req))]
|
||||
#[hotpath::measure(impl_type = "MultipartUsecase")]
|
||||
pub async fn execute_complete_multipart_upload(
|
||||
&self,
|
||||
req: S3Request<CompleteMultipartUploadInput>,
|
||||
@@ -664,6 +665,7 @@ impl DefaultMultipartUsecase {
|
||||
}
|
||||
|
||||
#[instrument(level = "debug", skip(self, req))]
|
||||
#[hotpath::measure(impl_type = "MultipartUsecase")]
|
||||
pub async fn execute_create_multipart_upload(
|
||||
&self,
|
||||
req: S3Request<CreateMultipartUploadInput>,
|
||||
@@ -845,6 +847,7 @@ impl DefaultMultipartUsecase {
|
||||
}
|
||||
|
||||
#[instrument(level = "debug", skip(self, req))]
|
||||
#[hotpath::measure(impl_type = "MultipartUsecase")]
|
||||
pub async fn execute_upload_part(&self, req: S3Request<UploadPartInput>) -> S3Result<S3Response<UploadPartOutput>> {
|
||||
let mut opts = ObjectOptions::default();
|
||||
apply_bucket_generation_guard(&req, &req.input.bucket, &mut opts)?;
|
||||
@@ -1180,6 +1183,7 @@ impl DefaultMultipartUsecase {
|
||||
}
|
||||
|
||||
#[instrument(level = "debug", skip(self, req))]
|
||||
#[hotpath::measure(impl_type = "MultipartUsecase")]
|
||||
pub async fn execute_upload_part_copy(
|
||||
&self,
|
||||
req: S3Request<UploadPartCopyInput>,
|
||||
|
||||
@@ -5319,6 +5319,7 @@ impl DefaultObjectUsecase {
|
||||
}
|
||||
|
||||
#[instrument(level = "info", skip(self, _fs, req))]
|
||||
#[hotpath::measure(impl_type = "DefaultObjectUsecase")]
|
||||
pub async fn execute_put_object(&self, _fs: &FS, req: S3Request<PutObjectInput>) -> S3Result<S3Response<PutObjectOutput>> {
|
||||
let start_time = std::time::Instant::now();
|
||||
let mut req = req;
|
||||
@@ -6258,6 +6259,7 @@ impl DefaultObjectUsecase {
|
||||
skip(self, req),
|
||||
fields(start_time=?time::OffsetDateTime::now_utc())
|
||||
)]
|
||||
#[hotpath::measure(impl_type = "DefaultObjectUsecase")]
|
||||
pub async fn execute_get_object(&self, req: S3Request<GetObjectInput>) -> S3Result<S3Response<GetObjectOutput>> {
|
||||
if let Some(context) = &self.context {
|
||||
let _ = context.object_store();
|
||||
@@ -8790,6 +8792,7 @@ impl DefaultObjectUsecase {
|
||||
}
|
||||
|
||||
#[instrument(level = "debug", skip(self, req))]
|
||||
#[hotpath::measure(impl_type = "DefaultObjectUsecase")]
|
||||
pub async fn execute_put_object_extract(&self, req: S3Request<PutObjectInput>) -> S3Result<S3Response<PutObjectOutput>> {
|
||||
let helper = OperationHelper::new(&req, EventName::ObjectCreatedPut, S3Operation::PutObject).suppress_event();
|
||||
let request_context = helper.request_context_or_from_request(&req);
|
||||
|
||||
Reference in New Issue
Block a user