Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Normalizer ¶
type Normalizer interface { // NormalizeExponentialHistogramDataPoint normalizes an exponential histogram. // It returns the normalized point, and true if the point should be kept. NormalizeExponentialHistogramDataPoint(point pmetric.ExponentialHistogramDataPoint, identifier uint64) bool // NormalizeHistogramDataPoint normalizes a cumulative histogram. // It returns the normalized point, and true if the point should be kept. NormalizeHistogramDataPoint(point pmetric.HistogramDataPoint, identifier uint64) bool // NormalizeNumberDataPoint normalizes a cumulative, monotonic sum. // It returns the normalized point, and true if the point should be kept. NormalizeNumberDataPoint(point pmetric.NumberDataPoint, identifier uint64) bool // NormalizeSummaryDataPoint normalizes a summary. // It returns the normalized point, and true if the point should be kept. NormalizeSummaryDataPoint(point pmetric.SummaryDataPoint, identifier uint64) bool }
Normalizer can normalize data points to handle cases in which the start time is unknown.
func NewDisabledNormalizer ¶
func NewDisabledNormalizer() Normalizer
NewDisabledNormalizer returns a Normalizer which does not perform any normalization. This may be useful if standard normalization consumes too much memory. For explicit reset points described in https://github.com/open-telemetry/opentelemetry-specification/blob/9555f9594c7ffe5dc333b53da5e0f880026cead1/specification/metrics/datamodel.md#resets-and-gaps it adjusts the end time to be after the start time to make the points valid without changing the start time (which causes the point to reset).
func NewStandardNormalizer ¶
func NewStandardNormalizer(shutdown <-chan struct{}, logger *zap.Logger) Normalizer
NewStandardNormalizer performs normalization on cumulative points which:
(a) don't have a start time, OR (b) have been sent a preceding "reset" point as described in https://github.com/open-telemetry/opentelemetry-specification/blob/9555f9594c7ffe5dc333b53da5e0f880026cead1/specification/metrics/datamodel.md#resets-and-gaps
The first point without a start time or the reset point is cached, and is NOT exported. Subsequent points "subtract" the initial point prior to exporting. This normalizer also detects subsequent resets, and produces a new start time for those points. It doesn't modify values after a reset, but does give it a new start time.