Skip to content

Commit 566023e

Browse files
Merge branch 'main' into feature/http-route-in-metric
2 parents 6633306 + 529178d commit 566023e

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
@@ -500,7 +500,7 @@ def test_flask_metrics_new_semconv(self):
500500
self.client.get("/hello/123")
501501
self.client.get("/hello/321")
502502
self.client.get("/hello/756")
503-
duration = max(round((default_timer() - start) * 1000), 0)
503+
duration_s = max(default_timer() - start, 0)
504504
metrics_list = self.memory_metrics_reader.get_metrics_data()
505505
number_data_point_seen = False
506506
histogram_data_point_seen = False
@@ -517,7 +517,7 @@ def test_flask_metrics_new_semconv(self):
517517
if isinstance(point, HistogramDataPoint):
518518
self.assertEqual(point.count, 3)
519519
self.assertAlmostEqual(
520-
duration, point.sum, delta=10
520+
duration_s, point.sum, places=2
521521
)
522522
histogram_data_point_seen = True
523523
if isinstance(point, NumberDataPoint):

0 commit comments

Comments
 (0)