28156d3573
* storagenode/piecestore: track live requests together Change-Id: I9ed44e4484b97bcbe076c222450c3449fe8b1075 * show grpc status codes in monkit failures Change-Id: I68bc3a8d24a372e8147ef2a74636fc3e40fa799a * small nit Change-Id: I722b09345377b079e41c5a3dc86d7fd6232c9d24
19 lines
375 B
Go
19 lines
375 B
Go
// Copyright (C) 2019 Storj Labs, Inc.
|
|
// See LICENSE for copying information.
|
|
|
|
package process
|
|
|
|
import (
|
|
"google.golang.org/grpc/status"
|
|
monkit "gopkg.in/spacemonkeygo/monkit.v2"
|
|
)
|
|
|
|
func init() {
|
|
monkit.AddErrorNameHandler(func(err error) (string, bool) {
|
|
if s, ok := status.FromError(err); ok {
|
|
return "grpc_" + s.Code().String(), true
|
|
}
|
|
return "", false
|
|
})
|
|
}
|