kubernetesmetrics

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: Apache-2.0 Imports: 7 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(config) config

Option allows configuring the behavior of the kubernetes remapper.

func WithKubernetesIntegrationDataset

func WithKubernetesIntegrationDataset(b bool) Option

WithKubernetesIntegrationDataset sets the dataset of the remapped metrics as as per the kubernetes integration. Example: kubernetes.pod

type Remapper

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

Remapper maps the OTel Kubernetes to Elastic Kubernetes metrics. These remapped metrics power the curated Kibana dashboards. Each datapoint translated using the remapper has the `event.processor` attribute set to `kubernetes`.

func NewRemapper

func NewRemapper(logger *zap.Logger, opts ...Option) *Remapper

NewRemapper creates a new instance of kubernetes remapper.

func (*Remapper) Remap

func (r *Remapper) Remap(
	src pmetric.ScopeMetrics,
	out pmetric.MetricSlice,
	resource pcommon.Resource,
)

Remap remaps an OTel ScopeMetrics to a list of OTel metrics such that the remapped metrics could be trivially converted into Elastic system metrics. It accepts the resource attributes to enrich the remapped metrics as per Elastic convention. The current remapping logic assumes that each Metric in the ScopeMetric will have datapoints for a single timestamp only. The remapped metrics are added to the output `MetricSlice`.

func (*Remapper) Valid

func (r *Remapper) Valid(sm pmetric.ScopeMetrics) bool

Valid validates a ScopeMetric against the kubernetes metrics remapper requirements. Kubernetes remapper only remaps metrics from kubeletstatsreceiver or k8sclusterreceiver.

Jump to

Keyboard shortcuts

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