diff --git a/astra/src/main/java/com/slack/astra/zipkinApi/ZipkinService.java b/astra/src/main/java/com/slack/astra/zipkinApi/ZipkinService.java index c7de18ae1f..8a5986fc39 100644 --- a/astra/src/main/java/com/slack/astra/zipkinApi/ZipkinService.java +++ b/astra/src/main/java/com/slack/astra/zipkinApi/ZipkinService.java @@ -117,7 +117,7 @@ protected static String convertLogWireMessageToZipkinSpan(List m span.setRemoteEndpoint(remoteEndpoint); } span.setTimestamp(convertToMicroSeconds(message.getTimestamp())); - span.setDuration(Math.toIntExact(duration)); + span.setDuration(duration); span.setTags(messageTags); traces.add(span); } diff --git a/astra/src/main/java/com/slack/astra/zipkinApi/ZipkinSpanResponse.java b/astra/src/main/java/com/slack/astra/zipkinApi/ZipkinSpanResponse.java index b07ee59525..d3ba5668de 100644 --- a/astra/src/main/java/com/slack/astra/zipkinApi/ZipkinSpanResponse.java +++ b/astra/src/main/java/com/slack/astra/zipkinApi/ZipkinSpanResponse.java @@ -23,8 +23,8 @@ public class ZipkinSpanResponse { private ZipkinEndpointResponse remoteEndpoint = null; @JsonProperty("duration") - // Zipkin spec defines this is integer, even though a long seems like it would be more appropriate - private int durationMicros; + // Zipkin spec defines this is integer64, so a long seems like a more appropriate + private long durationMicros; private String kind; @@ -48,7 +48,7 @@ public void setTimestamp(long timestampMicros) { this.timestampMicros = timestampMicros; } - public void setDuration(int durationMicros) { + public void setDuration(long durationMicros) { this.durationMicros = durationMicros; } @@ -96,7 +96,7 @@ public long getTimestamp() { return timestampMicros; } - public int getDuration() { + public long getDuration() { return durationMicros; }