Documentation
¶
Index ¶
- Constants
- func AggregateField(field string, rollupType RollupType) string
- func CreateLogsProcessor(_ context.Context, set component.ProcessorCreateSettings, cfg config.Processor, ...) (component.LogsProcessor, error)
- func NewFactory() component.ProcessorFactory
- type Config
- type Rollup
- type RollupType
Constants ¶
View Source
const ( // RedactedAttributeValue is a value that replaces actual attribute value // in case it exceeds cardinality limit. RedactedAttributeValue = "REDACTED_VIA_CARDINALITY_LIMIT" )
View Source
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 component.ProcessorCreateSettings, cfg config.Processor, nextConsumer consumer.Logs, ) (component.LogsProcessor, error)
CreateLogsProcessor returns rollupProcessor handling logs.
func NewFactory ¶
func NewFactory() component.ProcessorFactory
NewFactory returns a new factory for the Rollup processor.
Types ¶
type Config ¶
type Config struct { config.ProcessorSettings `mapstructure:",squash"` // squash ensures fields are correctly decoded in embedded struct AttributeCardinalityLimit int `mapstructure:"attribute_cardinality_limit"` }
Config defines configuration for rollup processor.
type Rollup ¶
type Rollup struct { FromField string `mapstructure:"from"` ToField string `mapstructure:"to"` Type RollupType `mapstructure:"type"` TreatAsMissing []string `mapstructure:"treat_as_missing"` Datasketch bool `mapstructure:"datasketch"` }
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 (*Rollup) GetFromFieldValue ¶ added in v0.1.3
GetFromFieldValue returns value of `FromField` from attributes as float64.
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" )
Click to show internal directories.
Click to hide internal directories.