{
  "id": "metrics_config",
  "title": "Metrics configuration object",
  "url": "https://redis.io/docs/latest/operate/rs/references/rest-api/objects/metrics_config/",
  "summary": "An object that represents the cluster's v2 metrics stream engine configuration",
  "tags": [
    "docs",
    "operate",
    "rs"
  ],
  "last_updated": "2026-07-24T10:52:10-07:00",
  "page_type": "content",
  "content_hash": "33e935ca82699b2151b553469aa98e62b2ed36fda3900eae42ea5948be25cc27",
  "sections": [
    {
      "id": "content",
      "title": "Content",
      "role": "content",
      "text": "An API object that represents the cluster-wide configuration of the [v2 metrics stream engine](https://redis.io/docs/latest/operate/rs/monitoring/metrics_stream_engine).\n\n| Name | Type | Default | Description |\n|------|------|---------|-------------|\n| key_distribution_enabled | boolean | `false` | Enables histogram metrics that report the distribution of key sizes and key item counts |\n| key_size_buckets | string | `\"\"` | Bucket boundaries for the key size distribution histogram. An empty value derives the boundaries from Redis. Otherwise, a comma-separated list of strictly ascending boundaries. Each boundary is a number (bytes) with an optional uppercase unit suffix `B`, `K`, `M`, `G`, `T`, `P`, or `E`; the numeric part must be between 1 and 1023. |\n| key_items_buckets | string | `\"\"` | Bucket boundaries for the key item-count distribution histogram. Uses the same format as `key_size_buckets`. |\n| local_storage_max_size_mb | integer | `1024` | Maximum size, in MB, of on-node metrics storage (minimum 1) |\n| local_storage_retention_days | integer | `8` | Number of days metrics are retained in on-node storage (minimum 1) |\n| expose_db_tags | boolean | `false` | When `true`, enables export of database tags through the `db_tags` metric |\n| metrics_tag_keys_exposed | array of strings | `[]` | The database tag keys that are eligible to be exported as labels (maximum 50 keys). Each key must follow the [tag key validation rules](https://redis.io/docs/latest/operate/rs/databases/configure/db-tags#tag-validation-rules). Keys are matched against database tag keys exactly and case-sensitively. |\n| max_requests_in_flight | integer | `2` | Maximum number of metrics requests the cluster processes concurrently. Set to 0 to remove the limit. |"
    }
  ],
  "examples": []
}
