app/vmagent: properly add labels set via -remoteWrite.label to metrics before sending them to -remoteWrite.url

This commit is contained in:
Aliaksandr Valialkin 2020-03-06 19:26:17 +02:00
parent 0d893eff36
commit 47e986c26f

View file

@ -89,7 +89,7 @@ func Stop() {
// Each timeseries in wr.Timeseries must contain one sample.
func Push(wr *prompbmarshal.WriteRequest) {
var rctx *relabelCtx
if len(prcsGlobal) > 0 {
if len(prcsGlobal) > 0 || len(labelsGlobal) > 0 {
rctx = getRelabelCtx()
}
tss := wr.Timeseries