Java SDK Latency Measure metrics units

Hey folks,
I just wanted to confirm if the provided Java SDK Latency metrics (ex. temporal_workflow_endtoend_latency) were measured in milliseconds.

Thanks!

1 Like

Correct. The Java SDK records durations in units of milliseconds:

Relevant SDK code snippet:

com.uber.m3.util.Duration d =
ProtobufTimeUtils.ToM3Duration(
Timestamps.fromMillis(System.currentTimeMillis()), wfStartTime);

Correction: Depending on the Reporter used, it looks like we record raw timer values in units of nanoseconds; however, if your graphs match reality if the millisecond unit is assumed, then it is possible the backend serving the metrics might be doing some conversion.

Thanks for the confirmation!
Assuming milliseconds, my graphs do match up nicely in reality.

1 Like