From 8adef2adb814e9b3403b203fcc68e77b1a06d683 Mon Sep 17 00:00:00 2001 From: mountain Date: Thu, 23 Nov 2023 10:39:25 +0900 Subject: [PATCH] =?UTF-8?q?metric=20=EC=82=AC=EC=9D=B4=EC=A6=88=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- metric/metric.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/metric/metric.go b/metric/metric.go index c520214..82b4cf3 100644 --- a/metric/metric.go +++ b/metric/metric.go @@ -85,8 +85,15 @@ func (mw *metric_int64) Add(inc int64) { } func (mc *metricCollection) metricWriter() { + defer func() { + r := recover() + if r != nil { + logger.Error(r) + } + }() + // head + metric_key_size + 8byte + tail + cr = 19 - var buff [20]byte + var buff [19]byte buff[0] = METRIC_HEAD_INLINE buff[17] = METRIC_TAIL_INLINE buff[18] = '\n'