Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BufferMetrics ¶
type BufferMetrics struct {
// contains filtered or unexported fields
}
BufferMetrics contains the pre-bound metric handles for one buffer. Keeping these handles avoids a label lookup on every buffered item.
func (*BufferMetrics) Buffered ¶
func (m *BufferMetrics) Buffered()
func (*BufferMetrics) Closed ¶
func (m *BufferMetrics) Closed()
Closed records an attempted write after the buffer has begun closing.
func (*BufferMetrics) Dropped ¶
func (m *BufferMetrics) Dropped()
func (*BufferMetrics) SetFillRatio ¶
func (m *BufferMetrics) SetFillRatio(value float64)
type Metrics ¶
type Metrics struct {
// BufferState is a counter to track the number of times a buffer is used and
// what state is triggered.
//
// Possible states are:
// - "buffered": The item was added to the buffer.
// - "dropped": The item was dropped because the buffer was full.
// - "closed": An insert was rejected because the buffer was closing or closed.
//
// Example usage:
// metrics.BufferInserts.WithLabelValues(b.String(), "buffered").Inc()
BufferState *lazy.CounterVec
// BufferSize is a gauge to track the fill percentage of buffers and whether or not they
// are configured to drop on overflow.
//
// Example usage:
// metrics.BufferSize.WithLabelValues(b.String(), "true").Set(float64(capacity)/float64(maxCapacity))
BufferSize *lazy.GaugeVec
}
Click to show internal directories.
Click to hide internal directories.