diff --git a/hypertrace-view-generator/hypertrace-view-generator/src/main/java/org/hypertrace/viewgenerator/generators/BaseViewGenerator.java b/hypertrace-view-generator/hypertrace-view-generator/src/main/java/org/hypertrace/viewgenerator/generators/BaseViewGenerator.java index d61c4858d..c7c36f64e 100644 --- a/hypertrace-view-generator/hypertrace-view-generator/src/main/java/org/hypertrace/viewgenerator/generators/BaseViewGenerator.java +++ b/hypertrace-view-generator/hypertrace-view-generator/src/main/java/org/hypertrace/viewgenerator/generators/BaseViewGenerator.java @@ -51,8 +51,7 @@ static double getDurationMetricValue(Event event) { } static double getDurationMetricValueTrace(StructuredTrace structuredTrace) { - MetricValue value = - structuredTrace.getEventList().get(0).getMetrics().getMetricMap().get("Duration-micro"); + MetricValue value = structuredTrace.getMetrics().getMetricMap().get("Duration-micro"); return value.getValue(); } diff --git a/span-normalizer/span-normalizer/src/main/java/org/hypertrace/core/spannormalizer/jaeger/JaegerSpanNormalizer.java b/span-normalizer/span-normalizer/src/main/java/org/hypertrace/core/spannormalizer/jaeger/JaegerSpanNormalizer.java index ed46ca43b..5ce268009 100644 --- a/span-normalizer/span-normalizer/src/main/java/org/hypertrace/core/spannormalizer/jaeger/JaegerSpanNormalizer.java +++ b/span-normalizer/span-normalizer/src/main/java/org/hypertrace/core/spannormalizer/jaeger/JaegerSpanNormalizer.java @@ -371,7 +371,7 @@ private Event buildEvent( jaegerSpan.getDuration().getSeconds() + (long) jaegerSpan.getDuration().getNanos() / 1000.0) .build(); - metricMap.put("Duration", durationMetric); + metricMap.put("Duration-micro", durationMetric); eventBuilder.setMetrics(fastNewBuilder(Metrics.Builder.class).setMetricMap(metricMap).build());