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