This commit is contained in:
Matej Kramny
2015-03-20 20:58:56 +01:00
parent cdf51d89f6
commit d421b35e9b
7 changed files with 52 additions and 52 deletions

View File

@@ -1,9 +1,9 @@
package cachet
import (
"encoding/json"
"fmt"
"strconv"
"encoding/json"
)
// SendMetric sends lag metric point
@@ -16,9 +16,9 @@ func SendMetric(metricID int, delay int64) {
"value": delay,
})
resp, _, err := makeRequest("POST", "/metrics/" + strconv.Itoa(metricID) + "/points", jsonBytes)
resp, _, err := makeRequest("POST", "/metrics/"+strconv.Itoa(metricID)+"/points", jsonBytes)
if err != nil || resp.StatusCode != 200 {
fmt.Printf("Could not log data point!\n%v\n", err)
return
}
}
}