diff --git a/pinot-common/src/main/java/org/apache/pinot/common/metrics/ControllerMeter.java b/pinot-common/src/main/java/org/apache/pinot/common/metrics/ControllerMeter.java index 9e80efac21f1..b474a44a6d87 100644 --- a/pinot-common/src/main/java/org/apache/pinot/common/metrics/ControllerMeter.java +++ b/pinot-common/src/main/java/org/apache/pinot/common/metrics/ControllerMeter.java @@ -47,6 +47,7 @@ public enum ControllerMeter implements AbstractMetrics.Meter { LLC_STREAM_DATA_LOSS("dataLoss", false), CONTROLLER_PERIODIC_TASK_RUN("periodicTaskRun", false), CONTROLLER_PERIODIC_TASK_ERROR("periodicTaskError", false), + CONTROLLER_TABLE_SEGMENT_UPLOAD_ERROR("TableSegmentUploadError", false), PERIODIC_TASK_ERROR("periodicTaskError", false), NUMBER_TIMES_SCHEDULE_TASKS_CALLED("tasks", true), NUMBER_TASKS_SUBMITTED("tasks", false), diff --git a/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentUploadDownloadRestletResource.java b/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentUploadDownloadRestletResource.java index 603ba75fe5b5..f7fcf715a1fe 100644 --- a/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentUploadDownloadRestletResource.java +++ b/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSegmentUploadDownloadRestletResource.java @@ -401,6 +401,7 @@ private SuccessResponse uploadSegment(@Nullable String tableName, TableType tabl throw e; } catch (Exception e) { _controllerMetrics.addMeteredGlobalValue(ControllerMeter.CONTROLLER_SEGMENT_UPLOAD_ERROR, 1L); + _controllerMetrics.addMeteredTableValue(tableName, ControllerMeter.CONTROLLER_TABLE_SEGMENT_UPLOAD_ERROR, 1L); throw new ControllerApplicationException(LOGGER, "Exception while uploading segment: " + e.getMessage(), Response.Status.INTERNAL_SERVER_ERROR, e); } finally {