@@ -530,7 +530,7 @@ def test_basic_metric_success(self):
530530 dict (point .attributes ),
531531 )
532532 self .assertEqual (point .count , 1 )
533- self .assertAlmostEqual (duration , point .sum , delta = 40 )
533+ self .assertAlmostEqual (duration , point .sum , delta = 350 )
534534 if isinstance (point , NumberDataPoint ):
535535 self .assertDictEqual (
536536 expected_requests_count_attributes ,
@@ -565,7 +565,9 @@ def test_basic_metric_success_new_semconv(self):
565565 )
566566 self .assertEqual (point .count , 1 )
567567 if metric .name == "http.server.request.duration" :
568- self .assertAlmostEqual (duration_s , point .sum , places = 1 )
568+ self .assertAlmostEqual (
569+ duration_s * 0.1 , point .sum , places = 1
570+ )
569571 elif metric .name == "http.server.response.body.size" :
570572 self .assertEqual (25 , point .sum )
571573 elif metric .name == "http.server.request.body.size" :
@@ -615,9 +617,11 @@ def test_basic_metric_success_both_semconv(self):
615617 for point in list (metric .data .data_points ):
616618 if isinstance (point , HistogramDataPoint ):
617619 self .assertEqual (point .count , 1 )
618- self .assertAlmostEqual (duration , point .sum , delta = 40 )
620+ self .assertAlmostEqual (duration , point .sum , delta = 350 )
619621 if metric .name == "http.server.request.duration" :
620- self .assertAlmostEqual (duration_s , point .sum , places = 1 )
622+ self .assertAlmostEqual (
623+ duration_s * 0.1 , point .sum , places = 1
624+ )
621625 self .assertDictEqual (
622626 expected_duration_attributes_new ,
623627 dict (point .attributes ),
@@ -635,7 +639,7 @@ def test_basic_metric_success_both_semconv(self):
635639 dict (point .attributes ),
636640 )
637641 elif metric .name == "http.server.duration" :
638- self .assertAlmostEqual (duration , point .sum , delta = 40 )
642+ self .assertAlmostEqual (duration , point .sum , delta = 350 )
639643 self .assertDictEqual (
640644 expected_duration_attributes_old ,
641645 dict (point .attributes ),
@@ -691,7 +695,7 @@ def test_basic_metric_nonstandard_http_method_success(self):
691695 dict (point .attributes ),
692696 )
693697 self .assertEqual (point .count , 1 )
694- self .assertAlmostEqual (duration , point .sum , delta = 40 )
698+ self .assertAlmostEqual (duration , point .sum , delta = 350 )
695699 if isinstance (point , NumberDataPoint ):
696700 self .assertDictEqual (
697701 expected_requests_count_attributes ,
@@ -726,7 +730,9 @@ def test_basic_metric_nonstandard_http_method_success_new_semconv(self):
726730 )
727731 self .assertEqual (point .count , 1 )
728732 if metric .name == "http.server.request.duration" :
729- self .assertAlmostEqual (duration_s , point .sum , places = 1 )
733+ self .assertAlmostEqual (
734+ duration_s * 0.1 , point .sum , places = 1
735+ )
730736 elif metric .name == "http.server.response.body.size" :
731737 self .assertEqual (31 , point .sum )
732738 elif metric .name == "http.server.request.body.size" :
@@ -777,7 +783,9 @@ def test_basic_metric_nonstandard_http_method_success_both_semconv(self):
777783 if isinstance (point , HistogramDataPoint ):
778784 self .assertEqual (point .count , 1 )
779785 if metric .name == "http.server.request.duration" :
780- self .assertAlmostEqual (duration_s , point .sum , places = 1 )
786+ self .assertAlmostEqual (
787+ duration_s * 0.1 , point .sum , places = 1
788+ )
781789 self .assertDictEqual (
782790 expected_duration_attributes_new ,
783791 dict (point .attributes ),
@@ -795,7 +803,7 @@ def test_basic_metric_nonstandard_http_method_success_both_semconv(self):
795803 dict (point .attributes ),
796804 )
797805 elif metric .name == "http.server.duration" :
798- self .assertAlmostEqual (duration , point .sum , delta = 40 )
806+ self .assertAlmostEqual (duration , point .sum , delta = 350 )
799807 self .assertDictEqual (
800808 expected_duration_attributes_old ,
801809 dict (point .attributes ),
@@ -836,7 +844,7 @@ def test_basic_post_request_metric_success(self):
836844 if isinstance (point , HistogramDataPoint ):
837845 self .assertEqual (point .count , 1 )
838846 if metric .name == "http.server.duration" :
839- self .assertAlmostEqual (duration , point .sum , delta = 40 )
847+ self .assertAlmostEqual (duration , point .sum , delta = 350 )
840848 elif metric .name == "http.server.response.size" :
841849 self .assertEqual (response_size , point .sum )
842850 elif metric .name == "http.server.request.size" :
@@ -861,7 +869,9 @@ def test_basic_post_request_metric_success_new_semconv(self):
861869 if isinstance (point , HistogramDataPoint ):
862870 self .assertEqual (point .count , 1 )
863871 if metric .name == "http.server.request.duration" :
864- self .assertAlmostEqual (duration_s , point .sum , places = 1 )
872+ self .assertAlmostEqual (
873+ duration_s * 0.1 , point .sum , places = 1
874+ )
865875 elif metric .name == "http.server.response.body.size" :
866876 self .assertEqual (response_size , point .sum )
867877 elif metric .name == "http.server.request.body.size" :
@@ -887,13 +897,15 @@ def test_basic_post_request_metric_success_both_semconv(self):
887897 if isinstance (point , HistogramDataPoint ):
888898 self .assertEqual (point .count , 1 )
889899 if metric .name == "http.server.request.duration" :
890- self .assertAlmostEqual (duration_s , point .sum , places = 1 )
900+ self .assertAlmostEqual (
901+ duration_s * 0.1 , point .sum , places = 1
902+ )
891903 elif metric .name == "http.server.response.body.size" :
892904 self .assertEqual (response_size , point .sum )
893905 elif metric .name == "http.server.request.body.size" :
894906 self .assertEqual (request_size , point .sum )
895907 elif metric .name == "http.server.duration" :
896- self .assertAlmostEqual (duration , point .sum , delta = 40 )
908+ self .assertAlmostEqual (duration , point .sum , delta = 350 )
897909 elif metric .name == "http.server.response.size" :
898910 self .assertEqual (response_size , point .sum )
899911 elif metric .name == "http.server.request.size" :
0 commit comments