Skip to content

Commit 7fd73dd

Browse files
authored
Do not treat failure to collect metrics as fatal (#102)
* Do not treat failure to collect metrics as fatal Signed-off-by: Marco Pracucci <[email protected]>
1 parent b52e21b commit 7fd73dd

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
## master / unreleased
22

3+
* [CHANGE] Do not treat failure to collect metrics as fatal #102
4+
35
## 0.10.0 / 2020-06-28
46

57
* [FEATURE] Autodiscover Google Poject ID #62

collectors/monitoring_collector.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import (
1717
"errors"
1818
"fmt"
1919
"math"
20-
"os"
2120
"strings"
2221
"sync"
2322
"time"
@@ -184,7 +183,6 @@ func (c *MonitoringCollector) Collect(ch chan<- prometheus.Metric) {
184183
errorMetric = float64(1)
185184
c.scrapeErrorsTotalMetric.Inc()
186185
level.Error(c.logger).Log("msg", "Error while getting Google Stackdriver Monitoring metrics", "err", err)
187-
os.Exit(1)
188186
}
189187
c.scrapeErrorsTotalMetric.Collect(ch)
190188

0 commit comments

Comments
 (0)