diff --git a/instrumentation/opentelemetry-instrumentation-flask/tests/test_programmatic.py b/instrumentation/opentelemetry-instrumentation-flask/tests/test_programmatic.py index d84c8b345b..2918021dd7 100644 --- a/instrumentation/opentelemetry-instrumentation-flask/tests/test_programmatic.py +++ b/instrumentation/opentelemetry-instrumentation-flask/tests/test_programmatic.py @@ -500,7 +500,7 @@ def test_flask_metrics_new_semconv(self): self.client.get("/hello/123") self.client.get("/hello/321") self.client.get("/hello/756") - duration = max(round((default_timer() - start) * 1000), 0) + duration_s = max(default_timer() - start, 0) metrics_list = self.memory_metrics_reader.get_metrics_data() number_data_point_seen = False histogram_data_point_seen = False @@ -517,7 +517,7 @@ def test_flask_metrics_new_semconv(self): if isinstance(point, HistogramDataPoint): self.assertEqual(point.count, 3) self.assertAlmostEqual( - duration, point.sum, delta=10 + duration_s, point.sum, places=2 ) histogram_data_point_seen = True if isinstance(point, NumberDataPoint):