diff --git a/services/backup/src/http/handlers/backup.rs b/services/backup/src/http/handlers/backup.rs --- a/services/backup/src/http/handlers/backup.rs +++ b/services/backup/src/http/handlers/backup.rs @@ -19,19 +19,18 @@ error::BackupError, }; -#[instrument(name = "upload_backup", skip_all, fields(backup_id))] +#[instrument(skip_all, fields(backup_id))] pub async fn upload( user: UserIdentity, blob_client: web::Data, db_client: web::Data, mut multipart: actix_multipart::Multipart, ) -> actix_web::Result { - info!("Upload backup request"); - let backup_id = get_named_text_field("backup_id", &mut multipart).await?; - tracing::Span::current().record("backup_id", &backup_id); + info!("Backup data upload started"); + let (user_keys_blob_info, user_keys_revoke) = forward_field_to_blob( &mut multipart, &blob_client, @@ -107,11 +106,7 @@ Ok(HttpResponse::Ok().finish()) } -#[instrument( - skip_all, - name = "forward_to_blob", - fields(hash_field_name, data_field_name) -)] +#[instrument(skip_all, fields(hash_field_name, data_field_name))] async fn forward_field_to_blob<'revoke, 'blob: 'revoke>( multipart: &mut actix_multipart::Multipart, blob_client: &'blob web::Data, @@ -180,7 +175,7 @@ Ok((blob_info, revoke_holder)) } -#[instrument(skip_all, name = "create_attachment_holder")] +#[instrument(skip_all)] async fn create_attachment_holder<'revoke, 'blob: 'revoke>( attachment: &str, blob_client: &'blob web::Data, @@ -204,7 +199,7 @@ Ok((holder, revoke_holder)) } -#[instrument(name = "download_user_keys", skip_all, fields(backup_id = %path.as_str()))] +#[instrument(skip_all, fields(backup_id = %path))] pub async fn download_user_keys( user: UserIdentity, path: web::Path, @@ -223,7 +218,7 @@ .await } -#[instrument(name = "download_user_data", skip_all, fields(backup_id = %path.as_str()))] +#[instrument(skip_all, fields(backup_id = %path))] pub async fn download_user_data( user: UserIdentity, path: web::Path, @@ -267,7 +262,7 @@ ) } -#[instrument(name = "get_latest_backup_id", skip_all, fields(username = %path.as_str()))] +#[instrument(skip_all, fields(username = %path))] pub async fn get_latest_backup_id( path: web::Path, db_client: web::Data, @@ -291,7 +286,7 @@ Ok(web::Json(response)) } -#[instrument(name = "download_latest_backup_keys", skip_all, fields(username = %path.as_str()))] +#[instrument(skip_all, fields(username = %path))] pub async fn download_latest_backup_keys( path: web::Path, db_client: web::Data,