prometheus metric 오류 처리
This commit is contained in:
@ -112,9 +112,11 @@ func (pe *prometheusExporter) loop(ctx context.Context) {
|
|||||||
return
|
return
|
||||||
|
|
||||||
case req := <-pe.writerChan:
|
case req := <-pe.writerChan:
|
||||||
|
if collector != nil {
|
||||||
if m := collector.metrics[req.key]; m != nil {
|
if m := collector.metrics[req.key]; m != nil {
|
||||||
atomic.StoreUint64(m.valptr, math.Float64bits(req.val))
|
atomic.StoreUint64(m.valptr, math.Float64bits(req.val))
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
case nm := <-pe.registerChan:
|
case nm := <-pe.registerChan:
|
||||||
var nextmetrics map[string]*prometheusMetricDesc
|
var nextmetrics map[string]*prometheusMetricDesc
|
||||||
|
|||||||
Reference in New Issue
Block a user