mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-21 14:44:00 +00:00
d134a310f3
Describe Your Changes When I use usePromCompatibleNaming with vmagent to process data that needs to be formatted from different sources such as InfluxDB, I find that it doesn’t work However, it works in vminsert. I found that vminsert uses the HasRelabeling method to determine whether to relabel. ```go func HasRelabeling() bool { pcs := pcsGlobal.Load() return pcs.Len() > 0 || *usePromCompatibleNaming } ``` in vmagent, the decision to relabel is determined only by pcsGlobal.Len() > 0. However, in the applyRelabeling method, the usePromCompatibleNaming logic is also used to determine whether to relabel in the error handling. ```go func (rctx *relabelCtx) applyRelabeling(tss []prompbmarshal.TimeSeries, pcs *promrelabel.ParsedConfigs) []prompbmarshal.TimeSeries { if pcs.Len() == 0 && !*usePromCompatibleNaming { // Nothing to change. return tss } ``` So I think that the logic for determining whether to relabel in vmagent is not as expected. Checklist The following checks are mandatory: [✅]My change adheres [VictoriaMetrics contributing guidelines](https://docs.victoriametrics.com/contributing/). --------- Co-authored-by: Roman Khavronenko <hagen1778@gmail.com> |
||
---|---|---|
.. | ||
client.go | ||
pendingseries.go | ||
pendingseries_test.go | ||
pendingseries_timing_test.go | ||
relabel.go | ||
relabel_test.go | ||
remotewrite.go | ||
remotewrite_test.go | ||
streamaggr.go |