Documentation ¶
Overview ¶
Package fakemetrics provides an implementation of the o11y metrics provider that will record all metrics you send it.
If sending metrics is a particularly important part of a component's functionality then this package will help you test those metrics are sent.
Index ¶
- Variables
- type MetricCall
- type Provider
- func (f *Provider) Calls() []MetricCall
- func (f *Provider) Close() error
- func (f *Provider) Count(name string, value int64, tags []string, rate float64) error
- func (f *Provider) Gauge(name string, value float64, tags []string, rate float64) error
- func (f *Provider) Histogram(name string, value float64, tags []string, rate float64) error
- func (f *Provider) Reset()
- func (f *Provider) TimeInMilliseconds(name string, value float64, tags []string, rate float64) error
Constants ¶
This section is empty.
Variables ¶
View Source
var CMPMetrics = gocmp.Options{ cmpopts.EquateApprox(0, 15), cmpopts.SortSlices(func(x, y MetricCall) bool { const format = "%s|%s|%s" return fmt.Sprintf(format, x.Metric, x.Name, x.Tags) < fmt.Sprintf(format, y.Metric, y.Name, y.Tags) }), }
Functions ¶
This section is empty.
Types ¶
type MetricCall ¶
Click to show internal directories.
Click to hide internal directories.