pitbullprocessor

package module
v0.0.0-...-64aa399 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2025 License: Apache-2.0 Imports: 29 Imported by: 0

README

pitbullprocessor

This processor is one of the main workhorses in the Cardinal Ecosystem. It's role is to apply rules obtained from its defined chqconfig extension to the telemetry passing through it. This can cause logs and spans to be sampled, dropped, or transformed. Metrics can be aggregated or dropped entirely, or otherwise transformed.

Each incoming rule is applied in order to the telemetry items received and then statements are applied. Sampling of logs is handled specially, as is dropping telemetry entirely.

All rules are written in OTTL, with some specific attributes set to indicate dropping the entire item or that a datapoint should be aggregated after removing an attribute.

Configuration

processors:
  pitbull/8bf0a2e0-8cc3-405e-9915-8eb8da17aadc:
    configuration_extension: "chqconfig"

All rule configuration is obtained dynamically at run-time from the named chqconfig extension.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() processor.Factory

func OrgIdFromResource

func OrgIdFromResource(resource pcommon.Map) string

Types

type Config

type Config struct {
	MetricAggregation      MetricAggregationConfig `mapstructure:"metric_aggregation"`
	LogsConfig             LogsConfig              `mapstructure:"logs"`
	TracesConfig           TracesConfig            `mapstructure:"traces"`
	MetricsConfig          MetricsConfig           `mapstructure:"metrics"`
	ConfigurationExtension *component.ID           `mapstructure:"configuration_extension"`
}

func (*Config) Validate

func (c *Config) Validate() error

type ContextID

type ContextID string

type LogsConfig

type LogsConfig struct {
	StatsEnrichments []StatsEnrichment `mapstructure:"stats_enrichments"`
}

func (*LogsConfig) Validate

func (cfg *LogsConfig) Validate() error

Validate function for LogsConfig

type MetricAggregationConfig

type MetricAggregationConfig struct {
	Interval time.Duration `mapstructure:"interval"`
}

func (*MetricAggregationConfig) Validate

func (c *MetricAggregationConfig) Validate() error

type MetricsConfig

type MetricsConfig struct {
	StatsEnrichments []StatsEnrichment `mapstructure:"stats_enrichments"`
}

type StatsEnrichment

type StatsEnrichment struct {
	Context ContextID `mapstructure:"context"`
	Tags    []string  `mapstructure:"tags"`
}

type TracesConfig

type TracesConfig struct {
	StatsEnrichments    []StatsEnrichment `mapstructure:"stats_enrichments"`
	EstimatorWindowSize int               `mapstructure:"estimator_window_size"`
	EstimatorInterval   int64             `mapstructure:"estimator_interval"`
}

func (*TracesConfig) Validate

func (tc *TracesConfig) Validate() error

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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