Documentation ¶
Index ¶
- Constants
- func AggregateField(field string, rollupType RollupType) string
- func CreateLogsProcessor(_ context.Context, set processor.CreateSettings, cfg component.Config, ...) (processor.Logs, error)
- func NewFactory(promRegistry *prometheus.Registry) processor.Factory
- type Config
- type Rollup
- type RollupGroup
- type RollupType
Constants ¶
const ( // RedactedAttributeValue is a value that replaces actual attribute value // in case it exceeds cardinality limit. RedactedAttributeValue = "REDACTED_VIA_CARDINALITY_LIMIT" )
const (
// RollupCountKey is the key used to store the count of the rollup.
RollupCountKey = "rollup_count"
)
Variables ¶
This section is empty.
Functions ¶
func AggregateField ¶ added in v0.1.3
func AggregateField(field string, rollupType RollupType) string
AggregateField returns the aggregate field name for the given field and rollup type.
func CreateLogsProcessor ¶
func CreateLogsProcessor( _ context.Context, set processor.CreateSettings, cfg component.Config, nextConsumer consumer.Logs, ) (processor.Logs, error)
CreateLogsProcessor returns rollupProcessor handling logs.
func NewFactory ¶
func NewFactory(promRegistry *prometheus.Registry) processor.Factory
NewFactory returns a new factory for the Rollup processor.
Types ¶
type Config ¶
type Config struct { AttributeCardinalityLimit int `mapstructure:"attribute_cardinality_limit"` RollupBuckets []float64 `mapstructure:"rollup_buckets"` // contains filtered or unexported fields }
Config defines configuration for rollup processor.
type Rollup ¶
type Rollup struct { FromField string ToField string Type RollupType TreatAsMissing []string }
Rollup represents single rollup operation. It describes Type of operation to be done on all `FromField`s from logs/traces. Result of operation is stored in `ToField`.
func NewRollups ¶ added in v0.15.0
func NewRollups(groups []RollupGroup) []*Rollup
NewRollups creates individual rollups based on rollup groups.
func (*Rollup) GetFromFieldValue ¶ added in v0.1.3
GetFromFieldValue returns value of `FromField` from attributes as float64.
type RollupGroup ¶ added in v0.15.0
RollupGroup represents a group of rollup operations of different types that all use the same FromField.
By default all basic rollup types will be used (sum, max, min, sum of squares). WithDatasketch enables also the Datasketch rollup type.
The name of ToField of Rollup will be inferred from the type of the rollup.
type RollupType ¶
type RollupType string
RollupType represents rollup type available in the processor.
const ( // RollupSum rolls up fields by adding them. RollupSum RollupType = "sum" // RollupMax rolls up fields by getting max value of them. RollupMax RollupType = "max" // RollupMin rolls up fields by getting min value of them. RollupMin RollupType = "min" // RollupSumOfSquares rolls up fields by summing squares of them. RollupSumOfSquares RollupType = "sumOfSquares" // RollupDatasketch rolls up fields by creating datasketch from them. RollupDatasketch RollupType = "datasketch" )