Skip to content

Commit

Permalink
Making duration as long (int64) for zipkinApi
Browse files Browse the repository at this point in the history
  • Loading branch information
zarna1parekh committed Nov 8, 2024
1 parent a5c6ab0 commit 9390507
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ protected static String convertLogWireMessageToZipkinSpan(List<LogWireMessage> m
span.setRemoteEndpoint(remoteEndpoint);
}
span.setTimestamp(convertToMicroSeconds(message.getTimestamp()));
span.setDuration(Math.toIntExact(duration));
span.setDuration(duration);
span.setTags(messageTags);
traces.add(span);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
}

Expand Down Expand Up @@ -96,7 +96,7 @@ public long getTimestamp() {
return timestampMicros;
}

public int getDuration() {
public long getDuration() {
return durationMicros;
}

Expand Down

0 comments on commit 9390507

Please sign in to comment.