@@ -2020,54 +2020,6 @@ def test_span_duration(self):
2020
2020
]
2021
2021
assert meta ["dataset" ] == self .dataset
2022
2022
2023
- def test_average_sampling_rate (self ):
2024
- spans = []
2025
- spans .append (
2026
- self .create_span (
2027
- {
2028
- "description" : "foo" ,
2029
- "sentry_tags" : {"status" : "success" },
2030
- "measurements" : {"client_sample_rate" : {"value" : 0.1 }},
2031
- },
2032
- start_ts = self .ten_mins_ago ,
2033
- )
2034
- )
2035
- spans .append (
2036
- self .create_span (
2037
- {
2038
- "description" : "bar" ,
2039
- "sentry_tags" : {"status" : "success" },
2040
- "measurements" : {"client_sample_rate" : {"value" : 0.85 }},
2041
- },
2042
- start_ts = self .ten_mins_ago ,
2043
- )
2044
- )
2045
- self .store_spans (spans , is_eap = self .is_eap )
2046
- response = self .do_request (
2047
- {
2048
- "field" : [
2049
- "avg_sample(sampling_rate)" ,
2050
- "count()" ,
2051
- "min(sampling_rate)" ,
2052
- "count_sample()" ,
2053
- ],
2054
- "query" : "" ,
2055
- "project" : self .project .id ,
2056
- "dataset" : self .dataset ,
2057
- }
2058
- )
2059
-
2060
- assert response .status_code == 200 , response .content
2061
- data = response .data ["data" ]
2062
- meta = response .data ["meta" ]
2063
- confidence = meta ["accuracy" ]["confidence" ]
2064
- assert len (data ) == 1
2065
- assert data [0 ]["avg_sample(sampling_rate)" ] == pytest .approx (0.475 )
2066
- assert data [0 ]["min(sampling_rate)" ] == pytest .approx (0.1 )
2067
- assert data [0 ]["count_sample()" ] == 2
2068
- assert data [0 ]["count()" ] == 11
2069
- assert confidence [0 ]["count()" ] == "low"
2070
-
2071
2023
def test_aggregate_numeric_attr (self ):
2072
2024
self .store_spans (
2073
2025
[
0 commit comments