final long traceid = 987654;
MetricsInfo info = new ExposedMetricsInfoImpl(TracingCompat.getTraceMetricName(traceid),
"Some generic trace");
// setup some metrics for the span
long spanid = 10;
AbstractMetric span = new ExposedMetricCounterLong(new ExposedMetricsInfoImpl(
MetricInfo.SPAN.traceName, ""), spanid);
long parentid = 11;
AbstractMetric parent = new ExposedMetricCounterLong(new ExposedMetricsInfoImpl(
MetricInfo.PARENT.traceName, ""), parentid);
long startTime = 12;
AbstractMetric start = new ExposedMetricCounterLong(new ExposedMetricsInfoImpl(
MetricInfo.START.traceName, ""), startTime);
long endTime = 13;
AbstractMetric end = new ExposedMetricCounterLong(new ExposedMetricsInfoImpl(
MetricInfo.END.traceName, ""), endTime);
final List<AbstractMetric> metrics = Lists.newArrayList(span, parent, start, end);
// create an annotation as well
String annotation = "test annotation for a span";