Skip to content

Commit

Permalink
Fixes #448. opentelemetry_metrics: Correct duration conversion (#449)
Browse files Browse the repository at this point in the history
from seconds to milliseconds.

Co-authored-by: Peter Kolloch <peter.kolloch@nexxiot.com>
  • Loading branch information
kolloch and Peter Kolloch authored Dec 12, 2022
1 parent 6ee8151 commit fb7cbe7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion poem/src/middleware/opentelemetry_metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ impl<E: Endpoint> Endpoint for OpenTelemetryMetricsEndpoint<E> {

self.request_count.add(&cx, 1, &labels);
self.duration
.record(&cx, elapsed.as_secs_f64() / 1000.0, &labels);
.record(&cx, elapsed.as_secs_f64() * 1000.0, &labels);

res
}
Expand Down

0 comments on commit fb7cbe7

Please sign in to comment.