File tree 1 file changed +5
-5
lines changed
docs/integrations/web-frameworks 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -59,16 +59,16 @@ Here is a sample query to compute those percentiles for HTTP requests duration:
59
59
WITH dataset AS (
60
60
SELECT
61
61
time_bucket(' %time_bucket_duration%' , start_timestamp) AS x,
62
- (extract(ms from end_timestamp - start_timestamp)) as duration_ms
62
+ duration * 1000 as duration_ms
63
63
FROM records
64
64
WHERE attributes ? ' http.method'
65
65
)
66
66
SELECT
67
67
x,
68
- approx_percentile_cont(duration_ms, 0 .50 ) as percentile_50,
69
- approx_percentile_cont(duration_ms, 0 .90 ) as percentile_90,
70
- approx_percentile_cont(duration_ms, 0 .95 ) as percentile_95,
71
- approx_percentile_cont(duration_ms, 0 .99 ) as percentile_99
68
+ approx_percentile_cont(0 .50 ) WITHIN GROUP ( ORDER BY duration_ms ) as percentile_50,
69
+ approx_percentile_cont(0 .90 ) WITHIN GROUP ( ORDER BY duration_ms ) as percentile_90,
70
+ approx_percentile_cont(0 .95 ) WITHIN GROUP ( ORDER BY duration_ms ) as percentile_95,
71
+ approx_percentile_cont(0 .99 ) WITHIN GROUP ( ORDER BY duration_ms ) as percentile_99
72
72
FROM dataset
73
73
GROUP BY x
74
74
ORDER BY x
You can’t perform that action at this time.
0 commit comments