Iterator<PhoenixMetricTag> tags = record.tags().iterator();
int annotationCount = 0;
while (tags.hasNext()) {
// hostname is a tag, so we differentiate it
PhoenixMetricTag tag = tags.next();
if (tag.name().equals(MetricInfo.HOSTNAME.traceName)) {
assertEquals("Didn't store correct hostname value", tag.value(),
spanInfo.hostname);
} else {
int count = annotationCount++;
assertEquals("Didn't get expected annotation", count + " - " + tag.value(),
spanInfo.annotations.get(count));
}
}
assertEquals("Didn't get expected number of annotations", annotationCount,
spanInfo.annotationCount);