Documentation ¶
Index ¶
- type AbstractFields
- type Count
- type Field
- type FieldsChain
- type Gauge
- type IntGauge
- type Metrics
- func (metrics *Metrics) Count(key string) types.Count
- func (metrics *Metrics) CountFields(key string, additionalFields AbstractFields) types.Count
- func (*Metrics) Flush()
- func (metrics *Metrics) ForEachCount(callback func(types.Count) bool) bool
- func (metrics *Metrics) ForEachGauge(callback func(types.Gauge) bool) bool
- func (metrics *Metrics) ForEachIntGauge(callback func(types.IntGauge) bool) bool
- func (metrics *Metrics) Gauge(key string) types.Gauge
- func (metrics *Metrics) GaugeFields(key string, additionalFields AbstractFields) types.Gauge
- func (metrics *Metrics) IntGauge(key string) types.IntGauge
- func (metrics *Metrics) IntGaugeFields(key string, additionalFields AbstractFields) types.IntGauge
- func (metrics Metrics) WithContextFields(allFields *FieldsChain, newFieldsCount int) Tool
- func (metrics *Metrics) WithTraceIDs(traceIDs TraceIDs, newTraceIDsCount int) Tool
- type Tool
- type TraceID
- type TraceIDs
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AbstractFields ¶
type AbstractFields = field.AbstractFields
AbstractFields is just a type-alias for field.AbstractFields (for convenience).
type Count ¶
Count is a naive implementation of Count.
func (*Count) WithResetFields ¶
func (metric *Count) WithResetFields(fields AbstractFields) types.Count
WithResetFields implements Count.
type FieldsChain ¶
type FieldsChain = field.FieldsChain
FieldsChain is just a type-alias for field.FieldsChain (for convenience).
type Gauge ¶
Gauge is a naive implementation of Gauge.
func (*Gauge) WithResetFields ¶
func (metric *Gauge) WithResetFields(fields AbstractFields) types.Gauge
WithResetFields implements Gauge.
type IntGauge ¶
IntGauge is a naive implementation of IntGauge.
func (*IntGauge) WithResetFields ¶
func (metric *IntGauge) WithResetFields(fields AbstractFields) types.IntGauge
WithResetFields implements IntGauge.
type Metrics ¶
type Metrics struct {
// contains filtered or unexported fields
}
Metrics is a naive implementation of Metrics
func (*Metrics) CountFields ¶
func (metrics *Metrics) CountFields(key string, additionalFields AbstractFields) types.Count
CountFields implements metrics.Metrics.
func (*Metrics) Flush ¶
func (*Metrics) Flush()
Flush implements metrics.Metrics (or more specifically belt.Tool).
func (*Metrics) ForEachCount ¶
ForEachCount iterates through all Count metrics. Stops at first `false` returned by the callback function.
func (*Metrics) ForEachGauge ¶
ForEachGauge iterates through all Gauge metrics. Stops at first `false` returned by the callback function.
func (*Metrics) ForEachIntGauge ¶
ForEachIntGauge iterates through all IntGauge metrics. Stops at first `false` returned by the callback function.
func (*Metrics) GaugeFields ¶
func (metrics *Metrics) GaugeFields(key string, additionalFields AbstractFields) types.Gauge
GaugeFields implements metrics.Metrics.
func (*Metrics) IntGaugeFields ¶
func (metrics *Metrics) IntGaugeFields(key string, additionalFields AbstractFields) types.IntGauge
IntGaugeFields implements metrics.Metrics.
func (Metrics) WithContextFields ¶
func (metrics Metrics) WithContextFields(allFields *FieldsChain, newFieldsCount int) Tool
WithContextFields implements metrics.Metrics.