@@ -530,7 +530,7 @@ def test_basic_metric_success(self):
530
530
dict (point .attributes ),
531
531
)
532
532
self .assertEqual (point .count , 1 )
533
- self .assertAlmostEqual (duration , point .sum , delta = 40 )
533
+ self .assertAlmostEqual (duration , point .sum , delta = 350 )
534
534
if isinstance (point , NumberDataPoint ):
535
535
self .assertDictEqual (
536
536
expected_requests_count_attributes ,
@@ -565,7 +565,9 @@ def test_basic_metric_success_new_semconv(self):
565
565
)
566
566
self .assertEqual (point .count , 1 )
567
567
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
+ )
569
571
elif metric .name == "http.server.response.body.size" :
570
572
self .assertEqual (25 , point .sum )
571
573
elif metric .name == "http.server.request.body.size" :
@@ -615,9 +617,11 @@ def test_basic_metric_success_both_semconv(self):
615
617
for point in list (metric .data .data_points ):
616
618
if isinstance (point , HistogramDataPoint ):
617
619
self .assertEqual (point .count , 1 )
618
- self .assertAlmostEqual (duration , point .sum , delta = 40 )
620
+ self .assertAlmostEqual (duration , point .sum , delta = 350 )
619
621
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
+ )
621
625
self .assertDictEqual (
622
626
expected_duration_attributes_new ,
623
627
dict (point .attributes ),
@@ -635,7 +639,7 @@ def test_basic_metric_success_both_semconv(self):
635
639
dict (point .attributes ),
636
640
)
637
641
elif metric .name == "http.server.duration" :
638
- self .assertAlmostEqual (duration , point .sum , delta = 40 )
642
+ self .assertAlmostEqual (duration , point .sum , delta = 350 )
639
643
self .assertDictEqual (
640
644
expected_duration_attributes_old ,
641
645
dict (point .attributes ),
@@ -691,7 +695,7 @@ def test_basic_metric_nonstandard_http_method_success(self):
691
695
dict (point .attributes ),
692
696
)
693
697
self .assertEqual (point .count , 1 )
694
- self .assertAlmostEqual (duration , point .sum , delta = 40 )
698
+ self .assertAlmostEqual (duration , point .sum , delta = 350 )
695
699
if isinstance (point , NumberDataPoint ):
696
700
self .assertDictEqual (
697
701
expected_requests_count_attributes ,
@@ -726,7 +730,9 @@ def test_basic_metric_nonstandard_http_method_success_new_semconv(self):
726
730
)
727
731
self .assertEqual (point .count , 1 )
728
732
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
+ )
730
736
elif metric .name == "http.server.response.body.size" :
731
737
self .assertEqual (31 , point .sum )
732
738
elif metric .name == "http.server.request.body.size" :
@@ -777,7 +783,9 @@ def test_basic_metric_nonstandard_http_method_success_both_semconv(self):
777
783
if isinstance (point , HistogramDataPoint ):
778
784
self .assertEqual (point .count , 1 )
779
785
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
+ )
781
789
self .assertDictEqual (
782
790
expected_duration_attributes_new ,
783
791
dict (point .attributes ),
@@ -795,7 +803,7 @@ def test_basic_metric_nonstandard_http_method_success_both_semconv(self):
795
803
dict (point .attributes ),
796
804
)
797
805
elif metric .name == "http.server.duration" :
798
- self .assertAlmostEqual (duration , point .sum , delta = 40 )
806
+ self .assertAlmostEqual (duration , point .sum , delta = 350 )
799
807
self .assertDictEqual (
800
808
expected_duration_attributes_old ,
801
809
dict (point .attributes ),
@@ -836,7 +844,7 @@ def test_basic_post_request_metric_success(self):
836
844
if isinstance (point , HistogramDataPoint ):
837
845
self .assertEqual (point .count , 1 )
838
846
if metric .name == "http.server.duration" :
839
- self .assertAlmostEqual (duration , point .sum , delta = 40 )
847
+ self .assertAlmostEqual (duration , point .sum , delta = 350 )
840
848
elif metric .name == "http.server.response.size" :
841
849
self .assertEqual (response_size , point .sum )
842
850
elif metric .name == "http.server.request.size" :
@@ -861,7 +869,9 @@ def test_basic_post_request_metric_success_new_semconv(self):
861
869
if isinstance (point , HistogramDataPoint ):
862
870
self .assertEqual (point .count , 1 )
863
871
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
+ )
865
875
elif metric .name == "http.server.response.body.size" :
866
876
self .assertEqual (response_size , point .sum )
867
877
elif metric .name == "http.server.request.body.size" :
@@ -887,13 +897,15 @@ def test_basic_post_request_metric_success_both_semconv(self):
887
897
if isinstance (point , HistogramDataPoint ):
888
898
self .assertEqual (point .count , 1 )
889
899
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
+ )
891
903
elif metric .name == "http.server.response.body.size" :
892
904
self .assertEqual (response_size , point .sum )
893
905
elif metric .name == "http.server.request.body.size" :
894
906
self .assertEqual (request_size , point .sum )
895
907
elif metric .name == "http.server.duration" :
896
- self .assertAlmostEqual (duration , point .sum , delta = 40 )
908
+ self .assertAlmostEqual (duration , point .sum , delta = 350 )
897
909
elif metric .name == "http.server.response.size" :
898
910
self .assertEqual (response_size , point .sum )
899
911
elif metric .name == "http.server.request.size" :
0 commit comments