processors

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2023 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package processors holds the type of processors that consul telemetery supports

Index

Constants

This section is empty.

Variables

View Source
var BatchProcessorID component.ID = component.NewID(batchProcessorName)

BatchProcessorID is the component id of the batch processor.

View Source
var FilterProcessorID component.ID = component.NewID(filterProcessorName)

FilterProcessorID is the component id of the filter processor.

View Source
var MemoryLimiterID component.ID = component.NewID(memoryLimiterName)

MemoryLimiterID is the component id of the memory limiter.

View Source
var ResourceProcessorID component.ID = component.NewID(resourceProcessorName)

ResourceProcessorID is the component id of the resource processor.

Functions

func BatchProcessorCfg

func BatchProcessorCfg(timeout time.Duration) *batchprocessor.Config

BatchProcessorCfg generates the config for a batch processor.

func MemoryLimiterCfg

func MemoryLimiterCfg() *memorylimiterprocessor.Config

MemoryLimiterCfg generates the config for a memory limiter processor.

Types

type Actions

type Actions struct {
	// Key specifies the attribute to act upon.
	// This is a required field.
	Key string `mapstructure:"key"`

	// Value specifies the value to populate for the key.
	// The type of the value is inferred from the configuration.
	Value interface{} `mapstructure:"value"`

	// Action specifies the type of action to perform.
	// The set of values are {INSERT, UPDATE, UPSERT, DELETE}.
	// Both lower case and upper case are supported.
	// INSERT -  Inserts the key/value to attributes when the key does not exist.
	//           No action is applied to attributes where the key already exists.
	//           Either Value, FromAttribute or FromContext must be set.
	// UPDATE -  Updates an existing key with a value. No action is applied
	//           to attributes where the key does not exist.
	//           Either Value, FromAttribute or FromContext must be set.
	// UPSERT -  Performs insert or update action depending on the attributes
	//           containing the key. The key/value is inserted to attributes
	//           that did not originally have the key. The key/value is updated
	//           for attributes where the key already existed.
	//           Either Value, FromAttribute or FromContext must be set.
	// DELETE  - Deletes the attribute. If the key doesn't exist,
	//           no action is performed.
	Action action `mapstructure:"action"`
}

Actions specifys the key, value and action that should be acted upon.

type FilterProcessorConfig

type FilterProcessorConfig struct {
	Metrics *MetricFilters `mapstructure:"metrics"`
}

FilterProcessorConfig creates the filter processor configuration.

func FilterProcessorCfg

func FilterProcessorCfg(client hcp.TelemetryClient) *FilterProcessorConfig

FilterProcessorCfg generates the config for a filter processor.

type MatchProperties

type MatchProperties struct {
	MatchType   string   `mapstructure:"match_type"`
	MetricNames []string `mapstructure:"metric_names"`
}

MatchProperties specifies how to match against a set of metric names for filtering signals.

type MetricFilters

type MetricFilters struct {
	Include *MatchProperties `mapstructure:"include"`
}

MetricFilters is the filter configuration for metrics.

type ResourceProcessorConfig

type ResourceProcessorConfig struct {
	Attributes []Actions `mapstructure:"attributes"`
}

ResourceProcessorConfig configures the Resource Processor.

func ResourcesProcessorCfg

func ResourcesProcessorCfg(client hcp.TelemetryClient) ResourceProcessorConfig

ResourcesProcessorCfg generates the config for a resource processor. The cluster's ResourceID is upserted as a label in all metrics.

Jump to

Keyboard shortcuts

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