@@ -19,7 +19,7 @@ s = Summary("request_latency_seconds", "Description of summary")
1919s.observe(4.7 )
2020```
2121
22- ### With labels
22+ ### Usage with labels
2323
2424``` python
2525from prometheus_summary import Summary
@@ -29,11 +29,13 @@ s.labels(method="GET", endpoint="/profile").observe(1.2)
2929s.labels(method = " POST" , endpoint = " /login" ).observe(3.4 )
3030```
3131
32- ### With custom quantiles and precisions
32+ ### Usage with custom quantiles and precisions
33+
34+ By default, metrics are observed for the following (quantile, precision (inaccuracy)) pairs:
3335
34- By default, metrics are observed for next (quantile, precision (inaccuracy)) pairs
3536` ((0.50, 0.05), (0.90, 0.01), (0.99, 0.001)) `
36- but you can provide your own values when creating the metric.
37+
38+ You can also provide your own values when creating the metric.
3739
3840``` python
3941from prometheus_summary import Summary
@@ -45,13 +47,13 @@ s = Summary(
4547s.observe(4.7 )
4648```
4749
48- ### With custom time window settings
50+ ### Usage with custom time window settings
4951
5052Typically, you don't want to have a Summary representing the entire runtime of the application,
51- but you want to look at a reasonable time interval. Summary metrics implement a configurable sliding time window.
53+ but you want to look at a reasonable time interval. This Summary metric implement a configurable sliding time window.
5254
5355The default is a time window of 10 minutes and 5 age buckets, i.e. the time window is 10 minutes wide, and
54- we slide it forward every 2 minutes, but you can configure this values for your own purposes.
56+ we slide it forward every 10 / 5 = 2 minutes, but you can configure this values for your own purposes.
5557
5658``` python
5759from prometheus_summary import Summary
@@ -75,7 +77,7 @@ from prometheus_summary import Summary
7577s = Summary(" request_latency_seconds" , " Description of summary" , [" method" , " endpoint" ])
7678```
7779
78- To show request latency by ` method ` , ` endpoint ` and ` quantile ` use next query:
80+ To show request latency by ` method ` , ` endpoint ` and ` quantile ` use the following PromQL query:
7981```
8082max by (method, endpoint, quantile) (request_latency_seconds)
8183```
0 commit comments