global

package
v1.8.4-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppO11y added in v1.5.0

type AppO11y struct {
	// ReportRoutes sets whether the metrics should set the http.route attribute
	ReportRoutes bool
	// K8sDatabase provides access to shared kubernetes metadata
	K8sDatabase *kube.Database
}

AppO11y stores context information that is only required for application observability.

type ContextInfo

type ContextInfo struct {
	// HostID of the host running Beyla. Unless testing environments, this value must be
	// automatically set after invoking FetchHostID
	HostID string
	// AppO11y stores context information that is only required for application observability.
	// Its values must be initialized by the App O11y code and shouldn't be accessed from the
	// NetO11y part.
	AppO11y AppO11y
	// Metrics  that are internal to the pipe components
	Metrics imetrics.Reporter
	// Prometheus connection manager to coordinate metrics exposition from diverse nodes
	Prometheus *connector.PrometheusManager
	// MetricAttributeGroups will selectively enable or disable diverse groups of attributes
	// in the metric exporters
	MetricAttributeGroups attributes.AttrGroups
	// K8sInformer enables direct access to the Kubernetes API
	K8sInformer *kube2.MetadataProvider
}

ContextInfo stores some context information that must be shared across some nodes of the processing graph.

func (*ContextInfo) FetchHostID added in v1.7.0

func (ci *ContextInfo) FetchHostID(ctx context.Context, timeout time.Duration)

FetchHostID tries to get the host ID from one of the following sources, by priority 1. If Beyla runs in AWS, GCP or Azure, it will take the instance ID 2. Otherwise, will try to read the Kubernetes Node MachineID field 3. Otherwise, will try to read the machine ID from the local OS filesystem 4. Otherwise, will fallback to the Hostname This process is known to fail when Beyla runs inside a Kubernetes Pod out of the cloud providers mentioned in (1). In that case, the host.id will be later set to the full hostname. This method must be invoked once the ContextInfo object is completely initialized

Jump to

Keyboard shortcuts

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