Source:
<code>public TaskResult call() { long startTimeMillis = System.currentTimeMillis(); IMetricsScope scope = MetricsHelper.getMetricsScope(); scope.addDimension(MetricsHelper.SHARD_ID_DIMENSION_NAME, shardInfo.getShardId()); scope.addData(RECORDS_PROCESSED_METRIC, 0, StandardUnit.Count, MetricsLevel.SUMMARY); scope.addData(DATA_BYTES_PROCESSED_METRIC, 0, StandardUnit.Bytes, MetricsLevel.SUMMARY); <START> getRecordsCache.setMetricOperation(this.getClass().getSimpleName()); <END> Exception exception = null; try { if (dataFetcher.isShardEndReached()) { LOG.info("Reached end of shard " + shardInfo.getShardId()); return new TaskResult(null, true); } final ProcessRecordsInput processRecordsInput = getRecordsResult(); throttlingReporter.success(); List<Record> records = processRecordsInput.getRecords(); if (!records.isEmpty()) { scope.addData(RECORDS_PROCESSED_METRIC, records.size(), StandardUnit.Count, MetricsLevel.SUMMARY); } else { handleNoRecords(startTimeMillis); } records = deaggregateRecords(records); recordProcessorCheckpointer.setLargestPermittedCheckpointValue( filterAndGetMaxExtendedSequenceNumber(scope, records, recordProcessorCheckpointer.getLastCheckpointValue(), recordProcessorCheckpointer.getLargestPermittedCheckpointValue())); if (shouldCallProcessRecords(records)) { callProcessRecords(processRecordsInput, records); } } catch (ProvisionedThroughputExceededException pte) { throttlingReporter.throttled(); exception = pte; backoff(); } catch (RuntimeException e) { LOG.error("ShardId " + shardInfo.getShardId() + ": Caught exception: ", e); exception = e; backoff(); } return new TaskResult(exception); }</code><technical_language>I this. I pass a String "ProcessTask"</technical_language>

Target:
public TaskResult call() { long startTimeMillis = System.currentTimeMillis(); IMetricsScope scope = MetricsHelper.getMetricsScope(); scope.addDimension(MetricsHelper.SHARD_ID_DIMENSION_NAME, shardInfo.getShardId()); scope.addData(RECORDS_PROCESSED_METRIC, 0, StandardUnit.Count, MetricsLevel.SUMMARY); scope.addData(DATA_BYTES_PROCESSED_METRIC, 0, StandardUnit.Bytes, MetricsLevel.SUMMARY); Exception exception = null; try { if (dataFetcher.isShardEndReached()) { LOG.info("Reached end of shard " + shardInfo.getShardId()); return new TaskResult(null, true); } final ProcessRecordsInput processRecordsInput = getRecordsResult(); throttlingReporter.success(); List<Record> records = processRecordsInput.getRecords(); if (!records.isEmpty()) { scope.addData(RECORDS_PROCESSED_METRIC, records.size(), StandardUnit.Count, MetricsLevel.SUMMARY); } else { handleNoRecords(startTimeMillis); } records = deaggregateRecords(records); recordProcessorCheckpointer.setLargestPermittedCheckpointValue( filterAndGetMaxExtendedSequenceNumber(scope, records, recordProcessorCheckpointer.getLastCheckpointValue(), recordProcessorCheckpointer.getLargestPermittedCheckpointValue())); if (shouldCallProcessRecords(records)) { callProcessRecords(processRecordsInput, records); } } catch (ProvisionedThroughputExceededException pte) { throttlingReporter.throttled(); exception = pte; backoff(); } catch (RuntimeException e) { LOG.error("ShardId " + shardInfo.getShardId() + ": Caught exception: ", e); exception = e; backoff(); } return new TaskResult(exception); }