diff --git a/agent/reader.go b/agent/reader.go index 32d989e..1dc5a45 100644 --- a/agent/reader.go +++ b/agent/reader.go @@ -217,6 +217,10 @@ func convert(item *types.Sample) *prompb.TimeSeries { // add other labels for k, v := range item.Labels { + k = strings.Replace(k, "/", "_", -1) + k = strings.Replace(k, ".", "_", -1) + k = strings.Replace(k, "-", "_", -1) + k = strings.Replace(k, " ", "_", -1) pt.Labels = append(pt.Labels, &prompb.Label{ Name: k, Value: v,