Closed laurit closed 2 months ago
> DurationUtil.millisToSeconds(ev.getLong(Constants.DURATION))
This looks strange. The raw value of the "duration" field is in ticks and the conversion factor depends on the platform and machine. The reasonable thing is to do ev.getDuration().toMillis() and let JFR do the conversion.
> DurationUtil.millisToSeconds(ev.getLong(Constants.DURATION))
This looks strange. The raw value of the "duration" field is in ticks and the conversion factor depends on the platform and machine. The reasonable thing is to do ev.getDuration().toMillis() and let JFR do the conversion.
@egahlin Thanks for reporting this. I have created https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/12256 to address this.
https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/12084 changed the unit to seconds but forgot to convert the value from millis to seconds