Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TransformAndRecordError ¶
func TransformAndRecordError(err error, metrics *RequestMetrics) error
TransformAndRecordError transforms errors to grpc-compatible error types and optionally truncates it if necessary.
Types ¶
type RequestMetrics ¶
type RequestMetrics struct {
// contains filtered or unexported fields
}
RequestMetrics per-endpoint request metrics.
func NewRequestMetrics ¶
func NewRequestMetrics(scope promutils.Scope, method string) RequestMetrics
func (*RequestMetrics) Record ¶
func (m *RequestMetrics) Record(code codes.Code)
func (*RequestMetrics) Success ¶
func (m *RequestMetrics) Success()
func (*RequestMetrics) Time ¶
func (m *RequestMetrics) Time(fn func())
Click to show internal directories.
Click to hide internal directories.