<p>I am responsible for maintaining the metrics and labels. With each metric, different labels are coming some by default and some custom. We are using the Grafana agent along with Prometheus.</p>
<p>Is there any way to find out the index size of each label generated by particular metrics, so we can figure out the high storage-consuming label?
Ex. For the <code>node_cpu_seconds_total</code> metric we get labels such as <code>Job</code>, <code>method</code>,<code>Podname</code>, <code>location</code>,<code>instance_name</code>, <code>mode</code> etc. Can we find storage occupied by this each label?</p>

beginnertopython
<p>You can configure <a href="https://grafana.com/docs/enterprise-metrics/latest/tenant-management/cardinality-management/" rel="nofollow noreferrer">Cardinality management dashboards</a> which can enable you to analyse your label usage and estimate storage consumption.</p>
<p>Besides that, it may be not exactly what you are looking for, because it relates to active series, not storage itself, but you can use <a href="https://grafana.com/docs/grafana-cloud/billing-and-usage/control-prometheus-metrics-usage/usage-analysis-mimirtool/" rel="nofollow noreferrer">Mimirtool to calculate number of series for each metric</a>. If your goal is to optimize storage consumption, it may be helpful as well.</p>
