diff --git a/docs/guides/overrides-exporter.md b/docs/guides/overrides-exporter.md index 5e8b7f9af6..afedb55af4 100644 --- a/docs/guides/overrides-exporter.md +++ b/docs/guides/overrides-exporter.md @@ -62,3 +62,17 @@ cortex_overrides{limit_name="max_samples_per_query",user="user1"} 100000 With these metrics, you can set up alerts to know when tenants are close to hitting their limits before they exceed them. + +## Exposed Metrics +Prior to version v1.20.0, the exporter only exposed the fixed, hardcoded list of limits shown in the example section above. + +As of version v1.20.0, the exporter automatically discovers and exposes all fields from the [limit_config](../configuration/config-file-reference.md#limits_config) configuration +that are numerically representable. + +The exposes metrics based on the following rules: +- Numerical types (`int`, `int64`, `uint`, `uint64`, `float64`) are converted directly to a `float64`. +- bool types are converted to 1.0 (for `true`) or 0.0 (for `false`). +- model.Duration types (which are internally `int64`) are converted to the total number of seconds as a `float64` (e.g, 1h becomes 3600.0). + +Fields with types such as `string`, `slice`, `map`, or other nested structs (like `metric_relabel_configs`) are ignored and not exported as metrics. +