metrics

package
v0.24.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 6, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

[testbed exporter] -> [otelcol receiver] -> [otelcol exporter] -> [testbed receiver] -> [test harness]

the difference being the testHarness, which is connected to [testbed receiver] as its metrics consumer, listening for datapoints. To start the process, one datapoint is sent into the testbed exporter, it goes through the pipeline, and arrives at the testbed receiver, which passes it along to the test harness. The test harness compares the received datapoint to the original datapoint it sent, and saves any diffs it found in a diffAccumulator instance. Then it sends the next datapoint. This continues until there are no more datapoints. The simple diagram above should have a loop, where [test harness] connects back to [testbed exporter].

Datapoints are supplied to the testHarness by a metricSupplier, which receives all of the metrics it needs upfront. Those metrics are in turn generated by a metricGenerator, which receives its config from a PICT generated file, as the trace correctness funcionality does.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MetricDiff

type MetricDiff struct {
	ExpectedValue interface{}
	ActualValue   interface{}
	Msg           string
}

MetricDiff is intended to support producing human-readable diffs between two MetricData structs during testing. Two MetricDatas, when compared, could produce a list of MetricDiffs containing all of their differences, which could be used to correct the differences between the expected and actual values.

func DiffMetric

func DiffMetric(diffs []*MetricDiff, expected pdata.Metric, actual pdata.Metric) []*MetricDiff

func (MetricDiff) String

func (mf MetricDiff) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL