processors

package
v0.0.0-...-b6baa5e Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2017 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package processors contains support for mutating event data after it's been parsed out of an event line.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FieldDropper

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

func (*FieldDropper) Init

func (f *FieldDropper) Init(options map[string]interface{}) error

func (*FieldDropper) Process

func (f *FieldDropper) Process(ev *event.Event) bool

type KubernetesMetadataProcessor

type KubernetesMetadataProcessor struct {
	PodGetter k8sagent.PodWatcher
	UID       types.UID
	// contains filtered or unexported fields
}

func (*KubernetesMetadataProcessor) Init

func (k *KubernetesMetadataProcessor) Init(options map[string]interface{}) error

func (*KubernetesMetadataProcessor) Process

func (k *KubernetesMetadataProcessor) Process(ev *event.Event) bool

type Processor

type Processor interface {
	Process(*event.Event) bool
	Init(options map[string]interface{}) error
}

Processor is the interface that processors implement. The Init() method is called to initialize the processor. Process() mutates event data in-place. Processors should return `true` if processing and sending should continue, and `false` if not. This is primarily relevant for sampling, and other processors should always return true.

func NewProcessor

func NewProcessor(name string, options map[string]interface{}) (Processor, error)

func NewProcessorFromConfig

func NewProcessorFromConfig(config map[string]map[string]interface{}) (Processor, error)

NewProcessorFromConfig takes a configuration map that's been unmarshalled out of YAML, and tries to instantiate a corresponding parser. The syntax for processor configuration is: processors:

  • request_shape: field: request prefix: shaped

or equivalently: {"processors": [{"request_shape": {"field": "request", "prefix": "shaped"}}]} So NewProcessorFromConfig expects to get a map with one key (the name of the processor).

type RequestShaper

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

func (*RequestShaper) Init

func (r *RequestShaper) Init(options map[string]interface{}) error

func (*RequestShaper) Process

func (r *RequestShaper) Process(ev *event.Event) bool

This is mostly borrowed from github.com/honeycombio/honeytail

type SampleType

type SampleType string
const (
	SampleTypeStatic  SampleType = "static"
	SampleTypeDynamic SampleType = "dynamic"
)

type Sampler

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

func (*Sampler) Init

func (s *Sampler) Init(options map[string]interface{}) error

func (*Sampler) Process

func (s *Sampler) Process(ev *event.Event) bool

type TimeFieldExtractor

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

func (*TimeFieldExtractor) Init

func (t *TimeFieldExtractor) Init(options map[string]interface{}) error

func (*TimeFieldExtractor) Process

func (t *TimeFieldExtractor) Process(ev *event.Event) bool

Jump to

Keyboard shortcuts

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