public static PhoenixMetricsRecord createRecord(long traceid, long parentid, long spanid,
String desc, long startTime, long endTime, String hostname, String... tags) {
PhoenixMetricRecordImpl record =
new PhoenixMetricRecordImpl(TracingCompat.getTraceMetricName(traceid), desc);
PhoenixAbstractMetric span = new PhoenixMetricImpl(MetricInfo.SPAN.traceName, spanid);
record.addMetric(span);
PhoenixAbstractMetric parent = new PhoenixMetricImpl(MetricInfo.PARENT.traceName, parentid);
record.addMetric(parent);
PhoenixAbstractMetric start = new PhoenixMetricImpl(MetricInfo.START.traceName, startTime);
record.addMetric(start);
PhoenixAbstractMetric end = new PhoenixMetricImpl(MetricInfo.END.traceName, endTime);
record.addMetric(end);
int tagCount = 0;
for (String annotation : tags) {
PhoenixMetricTag tag =