transform

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package transform provides some intermediate nodes that might filter/process/transform the events

Index

Constants

View Source
const (
	EnabledTrue       = KubeEnableFlag("true")
	EnabledFalse      = KubeEnableFlag("false")
	EnabledAutodetect = KubeEnableFlag("autodetect")
	EnabledDefault    = EnabledFalse

	// TODO: let the user decide which attributes to add, as in https://opentelemetry.io/docs/kubernetes/collector/components/#kubernetes-attributes-processor
	NamespaceName  = "k8s.namespace.name"
	PodName        = "k8s.pod.name"
	DeploymentName = "k8s.deployment.name"
	NodeName       = "k8s.node.name"
	PodUID         = "k8s.pod.uid"
	PodStartTime   = "k8s.pod.start_time"
)
View Source
const (
	// UnmatchUnset leaves the Route field as empty
	UnmatchUnset = UnmatchType("unset")
	// UnmatchPath sets the Route field to the same values as the Path
	UnmatchPath = UnmatchType("path")
	// UnmatchWildcard sets the route field to a generic asterisk symbol
	UnmatchWildcard = UnmatchType("wildcard")
	// UnmatchHeuristic detects the route field using a heuristic
	UnmatchHeuristic = UnmatchType("heuristic")

	UnmatchDefault = UnmatchWildcard
)
View Source
const (
	// IgnoreMetrics prevents sending metric events for ignored patterns
	IgnoreMetrics = IgnoreMode("metrics")
	// IgnoreTraces prevents sending trace events for ignored patterns
	IgnoreTraces = IgnoreMode("traces")
	// IgnoreAll prevents sending both metrics and traces for ignored patterns
	IgnoreAll = IgnoreMode("all")

	IgnoreDefault = IgnoreAll
)

Variables

This section is empty.

Functions

func RoutesProvider

func RoutesProvider(rc *RoutesConfig) (node.MiddleFunc[[]request.Span, []request.Span], error)

Types

type IgnoreMode added in v0.3.2

type IgnoreMode string

type KubeEnableFlag

type KubeEnableFlag string

type KubernetesDecorator

type KubernetesDecorator struct {
	Enable KubeEnableFlag `yaml:"enable" env:"BEYLA_KUBE_METADATA_ENABLE"`
	// KubeconfigPath is optional. If unset, it will look in the usual location.
	KubeconfigPath string `yaml:"kubeconfig_path" env:"KUBECONFIG"`

	InformersSyncTimeout time.Duration `yaml:"informers_sync_timeout" env:"BEYLA_KUBE_INFORMERS_SYNC_TIMEOUT"`
}

func (KubernetesDecorator) Enabled

func (d KubernetesDecorator) Enabled() bool

type RoutesConfig

type RoutesConfig struct {
	// Unmatch specifies what to do when a route pattern is not matched
	Unmatch UnmatchType `yaml:"unmatched"`
	// Patterns of the paths that will match to a route
	Patterns       []string   `yaml:"patterns"`
	IgnorePatterns []string   `yaml:"ignored_patterns"`
	IgnoredEvents  IgnoreMode `yaml:"ignore_mode"`
}

RoutesConfig allows grouping URLs sharing a given pattern.

type UnmatchType

type UnmatchType string

UnmatchType defines which actions to do when a route pattern is not recognized

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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