Skip to content

Commit

Permalink
Add table level metric for segment upload error (#13315)
Browse files Browse the repository at this point in the history
  • Loading branch information
tibrewalpratik17 authored Jul 2, 2024
1 parent 7213e13 commit f4a1f56
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit f4a1f56

Please sign in to comment.