private void handleBatchDeleteMetrics(BatchDeletePartitionResponseInfo partitionResponseInfo,
      BatchDeleteRequest batchDeleteRequest, ServerErrorCode operationServerErrorCode) {
    if (operationServerErrorCode != ServerErrorCode.NoError) {
      metrics.batchDeleteOperationError.inc();
    }
    for (BlobDeleteStatus blobDeleteStatus: partitionResponseInfo.getBlobsDeleteStatus()){
      // Set operation level error to Bad_Request if any of the blobs fails
      ServerErrorCode error = blobDeleteStatus.getStatus();
      if (error != ServerErrorCode.NoError) {
        // TODO: BatchDelete level metrics have been added for initial monitoring. Call can be taken later to remove those counters
        boolean logInErrorLevel = false;
        if (error == ServerErrorCode.BlobNotFound) {
          metrics.idNotFoundError.inc();
          metrics.idNotFoundErrorInBatchDelete.inc();
        } else if (error == ServerErrorCode.BlobExpired) {
          metrics.ttlExpiredError.inc();
          metrics.ttlExpiredErrorInBatchDelete.inc();
        } else if (error == ServerErrorCode.BlobDeleted) {
          metrics.idDeletedError.inc();
          metrics.idDeletedErrorInBatchDelete.inc();
        } else if (error == ServerErrorCode.BlobAuthorizationFailure) {
          metrics.deleteAuthorizationFailure.inc();
          metrics.deleteAuthorizationFailureInBatchDelete.inc();
        } else {
          logInErrorLevel = true;
          metrics.unExpectedStoreDeleteError.inc();
          metrics.unExpectedStoreDeleteErrorInBatchDelete.inc();
        }
        if (logInErrorLevel) {
          logger.error("Store exception on a delete within a batch delete operation with error code {} for request {}", error,
              batchDeleteRequest);
        } else {
          logger.trace("Store exception on a delete within a batch delete operation with error code {} for request {}", error,
              batchDeleteRequest);
        }
      }
    }
  }
Handler for all metrics to be updated for batch delete operation.
ambry-server/src/main/java/com/github/ambry/server/AmbryRequests.java