Description
-- Default set of latency buckets, 1ms to 60s:
local DEFAULT_BUCKETS = {1, 2, 5, 10, 20, 50, 100, 200, 500, 1000, 2000, 5000, 10000, 30000, 60000}
3 types: apisix/request/upstream
If we have 10,000 routes, the maximum number of metrics can be (15+1) * 3 * 10000 = 480,000, which is a huge response. (we will deploy 1 route to multiple services, so it will be much more records than that)
In production, we may not need such accurate metrics and can instead set them to {50, 100, 200, 500, 1000, 5000}, so it only have 210,000 metrics.
Or if we do not need the metrics by default, we can set it to {100000} to make the response small enough.(we registerd our own metrics)
Is it possible to set the buckets via plugin_attr? or can we add some triggers for those default metrics.
plugin_attr:
prometheus:
default_buckets:
- 50
- 100
- 200
- 500
Description
3 types: apisix/request/upstream
If we have 10,000 routes, the maximum number of metrics can be
(15+1) * 3 * 10000 = 480,000, which is a huge response. (we will deploy 1 route to multiple services, so it will be much more records than that)In production, we may not need such accurate metrics and can instead set them to
{50, 100, 200, 500, 1000, 5000}, so it only have210,000metrics.Or if we do not need the metrics by default, we can set it to
{100000}to make the response small enough.(we registerd our own metrics)Is it possible to set the buckets via plugin_attr? or can we add some triggers for those default metrics.