Documentation ¶
Index ¶
Constants ¶
const ( AttrNamespace = "k8s_namespace" AttrPodName = "k8s_pod_name" AttrDeploymentName = "k8s_deployment_name" AttrReplicaSetName = "k8s_replicaset_name" AttrDaemonSetName = "k8s_daemonset_name" AttrStatefulSetName = "k8s_statefulset_name" // AttrOwnerName would be a generic search criteria that would // match against deployment, replicaset, daemonset and statefulset names AttrOwnerName = "k8s_owner_name" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Attributes ¶
type Attributes struct { // Name will define a name for the matching service. If unset, it will take the name of the executable process Name string `yaml:"name"` // Namespace will define a namespace for the matching service. If unset, it will be left empty. Namespace string `yaml:"namespace"` // OpenPorts allows defining a group of ports that this service could open. It accepts a comma-separated // list of port numbers (e.g. 80) and port ranges (e.g. 8080-8089) OpenPorts PortEnum `yaml:"open_ports"` // Path allows defining the regular expression matching the full executable path. Path RegexpAttr `yaml:"exe_path"` // PathRegexp is deprecated but kept here for backwards compatibility with Beyla 1.0.x. // Deprecated. Please use Path (exe_path YAML attribute) PathRegexp RegexpAttr `yaml:"exe_path_regexp"` // Metadata stores other attributes, such as Kubernetes object metadata Metadata map[string]*RegexpAttr `yaml:",inline"` // PodLabels allows matching against the labels of a pod PodLabels map[string]*RegexpAttr `yaml:"k8s_pod_labels"` }
Attributes that specify a given instrumented service. Each instance has to define either the OpenPorts or Path property, or both. These are used to match a given executable. If both OpenPorts and Path are defined, the inspected executable must fulfill both properties.
type DefinitionCriteria ¶
type DefinitionCriteria []Attributes
DefinitionCriteria allows defining a group of services to be instrumented according to a set of attributes. If a given executable/service matches multiple of the attributes, the earliest defined service will take precedence.
func (DefinitionCriteria) PortOfInterest ¶
func (dc DefinitionCriteria) PortOfInterest(port int) bool
func (DefinitionCriteria) Validate ¶
func (dc DefinitionCriteria) Validate() error
type DiscoveryConfig ¶
type DiscoveryConfig struct { // Services selection. If the user defined the BEYLA_EXECUTABLE_NAME or BEYLA_OPEN_PORT variables, they will be automatically // added to the services definition criteria, with the lowest preference. Services DefinitionCriteria `yaml:"services"` // ExcludeServices works analogously to Services, but the applications matching this section won't be instrumented // even if they match the Services selection. ExcludeServices DefinitionCriteria `yaml:"exclude_services"` // PollInterval specifies, for the poll service watcher, the interval time between // process inspections PollInterval time.Duration `yaml:"poll_interval" env:"BEYLA_DISCOVERY_POLL_INTERVAL"` // SystemWide allows instrumentation of all HTTP (no gRPC) calls, incoming and outgoing at a system wide scale. // No filtering per application will be done. Using this option may result in reduced quality of information // gathered for certain languages, such as Golang. SystemWide bool `yaml:"system_wide" env:"BEYLA_SYSTEM_WIDE"` // Allow for Beyla to self instrument AllowSelfInstrumentation bool `yaml:"allow_self_instrumentation" env:"BEYLA_ALLOW_SELF_INSTRUMENTATION"` // This can be enabled to use generic HTTP tracers only, no Go-specifics will be used: SkipGoSpecificTracers bool `yaml:"skip_go_specific_tracers" env:"BEYLA_SKIP_GO_SPECIFIC_TRACERS"` // Debugging only option. Make sure the kernel side doesn't filter any PIDs, force user space filtering. BPFPidFilterOff bool `yaml:"bpf_pid_filter_off" env:"BEYLA_BPF_PID_FILTER_OFF"` // Disables instrumentation of services which are already instrumented ExcludeOTelInstrumentedServices bool `yaml:"exclude_otel_instrumented_services" env:"BEYLA_EXCLUDE_OTEL_INSTRUMENTED_SERVICES"` }
DiscoveryConfig for the discover.ProcessFinder pipeline
type PortEnum ¶
type PortEnum struct {
Ranges []PortRange
}
PortEnum defines an enumeration of ports. It allows defining a set of single ports as well a set of port ranges. When unmarshalled from text, it accepts a comma-separated list of port numbers (e.g. 80) and port ranges (e.g. 8080-8089). For example, this would be a valid port range: 80,443,8000-8999
func (*PortEnum) UnmarshalText ¶
func (*PortEnum) UnmarshalYAML ¶
type ProcessInfo ¶
ProcessInfo stores some relevant information about a running process
type RegexpAttr ¶
type RegexpAttr struct {
// contains filtered or unexported fields
}
RegexpAttr stores a regular expression representing an executable file path.
func NewPathRegexp ¶
func NewPathRegexp(re *regexp.Regexp) RegexpAttr
func (*RegexpAttr) IsSet ¶
func (p *RegexpAttr) IsSet() bool
func (*RegexpAttr) MatchString ¶
func (p *RegexpAttr) MatchString(input string) bool
func (*RegexpAttr) UnmarshalText ¶
func (p *RegexpAttr) UnmarshalText(text []byte) error
func (*RegexpAttr) UnmarshalYAML ¶
func (p *RegexpAttr) UnmarshalYAML(value *yaml.Node) error