instrument

package
v1.9.8 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

Start in background an internal metrics handler and return a context containing it. The metrics handler can be later retrieved via FromContext function.

Types

type InternalMetrics

type InternalMetrics interface {
	InformerNew()
	InformerUpdate()
	InformerDelete()

	ClientConnect()
	ClientDisconnect()

	MessageSubmit()
	MessageSucceed()
	MessageTimeout()
	MessageError()
}

InternalMetrics accounts diverse events of the Beyla Cache service

func FromContext

func FromContext(ctx context.Context) InternalMetrics

FromContext returns the internal metrics handler from the context. If any. If no metrics handler has been defined, it will return a NOOP metrics handler.

type InternalMetricsConfig

type InternalMetricsConfig struct {
	Port int    `yaml:"port,omitempty" env:"BEYLA_K8S_CACHE_INTERNAL_METRICS_PROMETHEUS_PORT"`
	Path string `yaml:"path,omitempty" env:"BEYLA_K8S_CACHE_INTERNAL_METRICS_PROMETHEUS_PATH"`
}

Jump to

Keyboard shortcuts

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