Source:
<code>static HeartbeatMetricKey reportWavefrontGeneratedData( WavefrontInternalReporter wfInternalReporter, String operationName, String application, String service, String cluster, String shard, String source, String componentTagValue, boolean isError, long spanDurationMicros, Set<String> traceDerivedCustomTagKeys, List<Annotation> spanAnnotations) { Map<String, String> pointTags = new HashMap<String, String>() {{ put(APPLICATION_TAG_KEY, application); put(SERVICE_TAG_KEY, service); put(CLUSTER_TAG_KEY, cluster); put(SHARD_TAG_KEY, shard); put(OPERATION_NAME_TAG, operationName); put(COMPONENT_TAG_KEY, componentTagValue); put(SOURCE_KEY, source); }}; for (String customTagKey : traceDerivedCustomTagKeys) { spanAnnotations.forEach((annotation) -> { if (annotation.getKey().equals(customTagKey)) { pointTags.put(customTagKey, annotation.getValue()); } }); } <START> <END> wfInternalReporter.newDeltaCounter(new MetricName(sanitize(application + "." + service + "." + operationName + INVOCATION_SUFFIX), pointTags)).inc(); if (isError) { wfInternalReporter.newDeltaCounter(new MetricName(sanitize(application + "." + service + "." + operationName + ERROR_SUFFIX), pointTags)).inc(); } wfInternalReporter.newWavefrontHistogram(new MetricName(sanitize(application + "." + service + "." + operationName + DURATION_SUFFIX), pointTags)). update(spanDurationMicros); wfInternalReporter.newDeltaCounter(new MetricName(sanitize(application + "." + service + "." + operationName + TOTAL_TIME_SUFFIX), pointTags)). inc(spanDurationMicros / 1000); return new HeartbeatMetricKey(application, service, cluster, shard, source); }</code><technical_language>spanAnnotations.forEach((annotation) -> { if (traceDerivedCustomTagKeys.contains(annotation.getKey())) { pointTags.put(annotation.getKey(), annotation.getValue()); } });</technical_language>

Target:
static HeartbeatMetricKey reportWavefrontGeneratedData( WavefrontInternalReporter wfInternalReporter, String operationName, String application, String service, String cluster, String shard, String source, String componentTagValue, boolean isError, long spanDurationMicros, Set<String> traceDerivedCustomTagKeys, List<Annotation> spanAnnotations) { Map<String, String> pointTags = new HashMap<String, String>() {{ put(APPLICATION_TAG_KEY, application); put(SERVICE_TAG_KEY, service); put(CLUSTER_TAG_KEY, cluster); put(SHARD_TAG_KEY, shard); put(OPERATION_NAME_TAG, operationName); put(COMPONENT_TAG_KEY, componentTagValue); put(SOURCE_KEY, source); }}; if (traceDerivedCustomTagKeys.size() > 0) { spanAnnotations.forEach((annotation) -> { if (traceDerivedCustomTagKeys.contains(annotation.getKey())) { pointTags.put(annotation.getKey(), annotation.getValue()); } }); } wfInternalReporter.newDeltaCounter(new MetricName(sanitize(application + "." + service + "." + operationName + INVOCATION_SUFFIX), pointTags)).inc(); if (isError) { wfInternalReporter.newDeltaCounter(new MetricName(sanitize(application + "." + service + "." + operationName + ERROR_SUFFIX), pointTags)).inc(); } wfInternalReporter.newWavefrontHistogram(new MetricName(sanitize(application + "." + service + "." + operationName + DURATION_SUFFIX), pointTags)). update(spanDurationMicros); wfInternalReporter.newDeltaCounter(new MetricName(sanitize(application + "." + service + "." + operationName + TOTAL_TIME_SUFFIX), pointTags)). inc(spanDurationMicros / 1000); return new HeartbeatMetricKey(application, service, cluster, shard, source); }