cumulativetodeltaprocessor

package module
v0.0.0-...-c1c2ac4 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

README

Cumulative to Delta Processor

Status: under development; Not recommended for production usage.

Supported pipeline types: metrics

Description

The cumulative to delta processor (cumulativetodeltaprocessor) converts cumulative sum metrics to cumulative delta.

Configuration

The default configuration is to convert all monotonic sum metrics from aggregation temporality cumulative to aggregation temporality delta.

The following settings can be optionally configured:

  • metrics: The processor uses metric names to identify a set of cumulative sum metrics and converts them to cumulative delta. Defaults to converting all metric names.
  • max_stale: The total time a state entry will live past the time it was last seen. Set to 0 to retain state indefinitely. Default: 0
  • monotonic_only: Specify whether only monotonic metrics are converted from cumulative to delta. Default: true. Set to false to convert metrics regardless of monotonic setting.
Example
processors:
    # processor name: cumulativetodelta
    cumulativetodelta:

        # list the cumulative sum metrics to convert to delta
        # (optional - defaults to converting all monotonic cumulative sum metrics)
        metrics:
            - <metric_1_name>
            - <metric_2_name>
            .
            .
            - <metric_n_name>

Documentation

Overview

package cumulativetodeltaprocessor implements a processor which converts cumulative sum metrics to cumulative delta.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() component.ProcessorFactory

NewFactory returns a new factory for the Metrics Generation processor.

Types

type Config

type Config struct {
	config.ProcessorSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct

	// List of cumulative metrics to convert to delta. Default: converts all cumulative metrics to delta.
	Metrics []string `mapstructure:"metrics"`

	// The total time a state entry will live past the time it was last seen. Set to 0 to retain state indefinitely.
	MaxStale time.Duration `mapstructure:"max_stale"`

	// Set to false in order to convert non monotonic metrics
	MonotonicOnly bool `mapstructure:"monotonic_only"`
}

Config defines the configuration for the processor.

func (*Config) Validate

func (cfg *Config) Validate() error

Validate checks if the processor configuration is valid

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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