Skip to content

Commit ec17ecc

Browse files
committed
f
1 parent a9a9733 commit ec17ecc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

components/service-waiter/pkg/metrics/metrics.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,12 @@ func addCounter(host, metricName string, labels map[string]string) {
3737
if err != nil {
3838
log.WithError(err).Error("cannot marshal body")
3939
}
40-
resp, err := http.Post(host+"/metrics/counter/add/"+metricName, "application/json", bytes.NewReader(b))
40+
resp, err := http.Post(host+"/metrics-api/metrics/counter/add/"+metricName, "application/json", bytes.NewReader(b))
4141
if err != nil {
4242
log.WithError(err).Error("cannot post metrics")
4343
}
44+
if resp.StatusCode != http.StatusOK {
45+
log.WithField("status", resp.Status).Error("failed to post metrics")
46+
}
4447
defer resp.Body.Close()
4548
}

0 commit comments

Comments
 (0)