diff --git a/storage/remote/storage.go b/storage/remote/storage.go index 5451fc245..1b756af11 100644 --- a/storage/remote/storage.go +++ b/storage/remote/storage.go @@ -17,12 +17,12 @@ import ( "context" "crypto/md5" "encoding/hex" - "encoding/json" "fmt" "sync" "time" "github.com/go-kit/kit/log" + "gopkg.in/yaml.v2" "github.com/prometheus/client_golang/prometheus" "github.com/prometheus/common/model" @@ -174,7 +174,7 @@ func labelsToEqualityMatchers(ls model.LabelSet) []*labels.Matcher { // Used for hashing configs and diff'ing hashes in ApplyConfig. func toHash(data interface{}) (string, error) { - bytes, err := json.Marshal(data) + bytes, err := yaml.Marshal(data) if err != nil { return "", err }