advanced_metrics

package
v2.33.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdvancedMetrics

type AdvancedMetrics struct {
	// contains filtered or unexported fields
}

AdvancedMetrics is structure responsible for app centric metrics pipeline. This structure starts and stops all pipeline parts and exposes public interface for receiving aggregated app centric metrics.

func NewAdvancedMetrics

func NewAdvancedMetrics(config Config, schema *schema.Schema) (*AdvancedMetrics, error)

func (*AdvancedMetrics) OutChannel

func (m *AdvancedMetrics) OutChannel() chan []*publisher.MetricSet

OutChannel returns publisher channel which will publish metrics sets in configured intervals(config.PublishingPeriod)

func (*AdvancedMetrics) Run

func (m *AdvancedMetrics) Run(ctx context.Context) error

type AggregatorConfig

type AggregatorConfig struct {
	// AggregationPeriod defines period of time after which metrics stored in StagingTable
	// will be aggregated into PriorityTable.
	AggregationPeriod time.Duration
	// PublishingPeriod defines period of time after which aggregated metrics from PriorityTable will be sent
	// over OutChannel in Publisher.
	PublishingPeriod time.Duration
}

AggregatorConfig store aggregator configuration

type Config

type Config struct {
	// Unix socket address on which AppCentricMetrics should listen for incoming metrics
	Address string

	AggregatorConfig
	TableSizesLimits
}

Config keeps configuration for app centric metric server

type TableSizesLimits

type TableSizesLimits struct {
	// StagingTableMaxSize specify soft limit of samples in the staging table.
	StagingTableMaxSize int `mapstructure:"staging_table_max_size" yaml:"-"`
	// StagingTableThreshold specify threshold level of staging table.
	// This threshold specify number of elements after which collapsing of dimensions will occur.
	// Dimensions collapsing is specified by CollapsingLevel.
	// Collapsing of dimensions of sample which is to be added to staging table will occur when:
	// DimensionCollapsingLevel < (CurrentSizeOfStagingTable - StagingTableThreshold)/(StagingTableMaxSize - StagingTableThreshold) * 100
	// which is just a percentage of use of table above the threshold level.
	StagingTableThreshold int `mapstructure:"staging_table_threshold" yaml:"-"`
	// PriorityTableMaxSize specify soft limit of samples in the priority table.
	PriorityTableMaxSize int `mapstructure:"priority_table_max_size" yaml:"-"`
	// PriorityTableThreshold specify threshold level of priority table.
	// This threshold specify number of elements after which collapsing of dimensions will occur.
	// Dimensions collapsing is specified by CollapsingLevel.
	// Collapsing of dimensions of sample will occur only if sample will not fit into priority queue which size is equal PriorityTableThreshold.
	// Priority queue is prioritized by samples hit count.
	// Dimensions will be collapsed if:
	// DimensionCollapsingLevel < (CurrentSizeOfPriorityTable - PriorityTableThreshold)/(PriorityTableMaxSize - PriorityTableThreshold) * 100
	// which is just a percentage of use of table above the threshold level.
	PriorityTableThreshold int `mapstructure:"priority_table_threshold" yaml:"-"`
}

TableSizesLimits specified size limitation for staging and priority tables. This config values determines collapsing of dimensions per each internal table. Collapsing will change value of dimension to "AGGR" value.

Jump to

Keyboard shortcuts

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