private void reportToMetric(
            @Nullable final ProfileEvent event,
            @NotNull final SortMetricItem item,
            final FetchResult fetchResult,
            final int size) {

        switch (fetchResult) {
            case SUCCESS:
                reportToMetric(item.readSuccessCount, item.readSuccessSize, size);
                AuditUtils.add(AuditUtils.AUDIT_ID_READ_SUCCESS, event);
                break;
            case FAILURE:
                reportToMetric(item.readFailCount, item.readFailSize, size);
                break;
            default:
                break;
        }
    }
Selector of metric report flow.

@param event The fetched event. May be <b>null</b> when fetch failed occurs.
@param item MetricItem that report to.
@param fetchResult Result of fetching, SUCCESS or FAILURE.
@param size The fetch length. -1 means fetch failure.
inlong-sort-standalone/sort-standalone-source/src/main/java/org/apache/inlong/sort/standalone/source/sortsdk/SortSdkSourceContext.java