cmd/statreceiver: Add instance tag to influx metric

Change-Id: I6545915c5cb93f6349c7b9d90f39e7d67c29038c
This commit is contained in:
Rafael Gomes 2020-02-21 16:33:00 -03:00
parent f185adcf7c
commit 5132d285db

View File

@ -71,6 +71,12 @@ keyRange:
newKey = append(newKey, key[:i]...)
newKey = append(newKey, ",application="...)
newKey = appendTag(newKey, application)
if strings.Contains(application, "satellite") {
newKey = append(newKey, ",instance="...)
newKey = appendTag(newKey, instance)
}
newKey = append(newKey, key[i:]...)
key = newKey