Skip to content

Commit 529178d

Browse files
authored
Fix wrong unit in Flask new semconv test (#2645)
1 parent 58a6d3a commit 529178d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

instrumentation/opentelemetry-instrumentation-flask/tests/test_programmatic.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -497,7 +497,7 @@ def test_flask_metrics_new_semconv(self):
497497
self.client.get("/hello/123")
498498
self.client.get("/hello/321")
499499
self.client.get("/hello/756")
500-
duration = max(round((default_timer() - start) * 1000), 0)
500+
duration_s = max(default_timer() - start, 0)
501501
metrics_list = self.memory_metrics_reader.get_metrics_data()
502502
number_data_point_seen = False
503503
histogram_data_point_seen = False
@@ -514,7 +514,7 @@ def test_flask_metrics_new_semconv(self):
514514
if isinstance(point, HistogramDataPoint):
515515
self.assertEqual(point.count, 3)
516516
self.assertAlmostEqual(
517-
duration, point.sum, delta=10
517+
duration_s, point.sum, places=2
518518
)
519519
histogram_data_point_seen = True
520520
if isinstance(point, NumberDataPoint):

0 commit comments

Comments
 (0)