<p>I have a use case where I need to append metrics label value in Prometheus.
for eg, if my metrics has a label {pod=pod1}, I need to change it to {pod=pod2} before or after scraping. Is this supported?</p>

ahmed mohiuddin
<p>You need to have a look at those two prometheus configurations :</p>
<ol>
<li><a href="https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config" rel="nofollow noreferrer">relabel_config</a> : this will allow you to work with the labels name and value <strong>before</strong> the scrape</li>
<li><a href="https://prometheus.io/docs/prometheus/latest/configuration/configuration/#metric_relabel_configs" rel="nofollow noreferrer">metric_relabel_configs</a> : this will allow you to work with your labels <strong>after</strong> the scrape <em>(but before ingestion)</em></li>
</ol>
<p>You can check out this <a href="https://www.robustperception.io/relabel_configs-vs-metric_relabel_configs" rel="nofollow noreferrer">article</a> which explains a bit more the difference between those two.</p>
