Documentation ¶
Overview ¶
Package metrictest provides helpers for metric testing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Int64Metrics ¶
Int64Metrics defines a metric to dimension mapping for int64 metrics.
func GatherInt64Metric ¶
func GatherInt64Metric(ms []metricdata.Metrics) Int64Metrics
GatherInt64Metric gathers the observed int64 metrics grouped by dimension.
type TestMetric ¶
type TestMetric struct { Reader sdkmetric.Reader MeterProvider *sdkmetric.MeterProvider Meter metric.Meter }
TestMetric returns all the necessary for tests.
func New ¶
func New() (tm TestMetric)
New creates a manual reader, meter provider and a meter from it.
func (TestMetric) Collect ¶
func (tm TestMetric) Collect(ctx context.Context) ( rm metricdata.ResourceMetrics, err error, )
Collect returns the metrics from the reader.
Click to show internal directories.
Click to hide internal directories.