check that metric is using
This commit is contained in:
parent
1e53e7f33b
commit
81f2b5fd15
@ -408,6 +408,9 @@ func (s *space) handleMessage(msg HandleMessage) {
|
|||||||
ctx := peer.CtxWithPeerId(context.Background(), msg.SenderId)
|
ctx := peer.CtxWithPeerId(context.Background(), msg.SenderId)
|
||||||
ctx = logger.CtxWithFields(ctx, zap.Uint64("msgId", msg.Id), zap.String("senderId", msg.SenderId))
|
ctx = logger.CtxWithFields(ctx, zap.Uint64("msgId", msg.Id), zap.String("senderId", msg.SenderId))
|
||||||
defer func() {
|
defer func() {
|
||||||
|
if s.metric == nil {
|
||||||
|
return
|
||||||
|
}
|
||||||
s.metric.RequestLog(msg.PeerCtx, "space.streamOp", msg.LogFields(
|
s.metric.RequestLog(msg.PeerCtx, "space.streamOp", msg.LogFields(
|
||||||
zap.Error(err),
|
zap.Error(err),
|
||||||
)...)
|
)...)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user