jaegertracing / jaeger-analytics-java

Data analytics pipeline and models for tracing data
Apache License 2.0
45 stars 24 forks source link

io.jaegertracing.analytics.model.Converter limits span durations to durations shorter than 1 second #55

Closed alefhar closed 3 years ago

alefhar commented 3 years ago

To convert from protobuf io.jaegertracing.api_v2.Model.Span to io.jaegertracing.analytisc.model.Span the class io.jaegertracing.analytics.model.Converter offers a utility method Span toSpan(Model.Span) which extracts and converts the data from the protobuf Model.Span and writes it to a custom Span which is later used to create a graph.

It seems, however, that toSpan() only copies the nano second fraction of the duration and completely ignores the seconds data field.

span.durationMicros = protoSpan.getDuration().getNanos() / 1000;

From the documentation a duration consists of a seconds part and a nanos part. The latter representing a fraction of a second at nanosecond resolution in the range -999,999,999 to +999,999,999 inclusive. nanos can only store durations less than a second. The same applies to Timestamp and any code that considers only the nanos part of a Timestamp.

Can you confirm, that this is an issue?

alefhar commented 3 years ago

@yurishkuro Is it possible to create a new release with this change. If not, when is the next release scheduled? Thanks

yurishkuro commented 3 years ago

I tagged the release, but the push to sonatype failed. I am not familiar with the release process, spent like 20min trying to get it working manually, no luck. cc @pavolloffay