Fix fmt.Errorf error message (#5199)
Signed-off-by: zhoulin xie <zhoulin.xie@daocloud.io>
This commit is contained in:
parent
a2a6e24f9f
commit
4cb6c202ff
|
@ -215,7 +215,7 @@ func (d *Discovery) refresh() (tg *targetgroup.Group, err error) {
|
||||||
dr := DiscoveryResponse{}
|
dr := DiscoveryResponse{}
|
||||||
err = json.Unmarshal(data, &dr)
|
err = json.Unmarshal(data, &dr)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return tg, fmt.Errorf("an error occurred unmarshaling the disovery response json. %s", err)
|
return tg, fmt.Errorf("an error occurred unmarshaling the discovery response json. %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, container := range dr.Containers {
|
for _, container := range dr.Containers {
|
||||||
|
|
|
@ -880,7 +880,7 @@ func TestScrapeLoopAppendSampleLimit(t *testing.T) {
|
||||||
t.Fatalf("Did not see expected sample limit error: %s", err)
|
t.Fatalf("Did not see expected sample limit error: %s", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check that the Counter has been incremented a simgle time for the scrape,
|
// Check that the Counter has been incremented a single time for the scrape,
|
||||||
// not multiple times for each sample.
|
// not multiple times for each sample.
|
||||||
metric := dto.Metric{}
|
metric := dto.Metric{}
|
||||||
err = targetScrapeSampleLimit.Write(&metric)
|
err = targetScrapeSampleLimit.Write(&metric)
|
||||||
|
|
Loading…
Reference in New Issue