metrics

package
v1.17.0-pre.2 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: Apache-2.0 Imports: 24 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RequestsTotal = prometheus.NewCounterVec(prometheus.CounterOpts{
		Namespace: api.DefaultPrometheusNamespace,
		Name:      "metrics_http_handler_requests_total",
		Help:      "A counter for requests to Hubble metrics handler.",
	}, []string{"code"})
	RequestDuration = prometheus.NewHistogramVec(prometheus.HistogramOpts{
		Namespace: api.DefaultPrometheusNamespace,
		Name:      "metrics_http_handler_request_duration_seconds",
		Help:      "A histogram of latencies of Hubble metrics handler.",
	}, []string{"code"})
)

Metrics related to Hubble metrics HTTP requests handling

View Source
var (
	LostEvents = prometheus.NewCounterVec(prometheus.CounterOpts{
		Namespace: api.DefaultPrometheusNamespace,
		Name:      "lost_events_total",
		Help:      "Number of lost events",
	}, []string{labelSource})
)

Additional metrics - they're not counting flows, so are not served via Hubble metrics API, but belong to the same Prometheus namespace.

Functions

func InitMetrics

func InitMetrics(reg *prometheus.Registry, enabled *api.Config, grpcMetrics *grpc_prometheus.ServerMetrics) error

InitMetrics initializes the metrics system

func InitMetricsServerHandler

func InitMetricsServerHandler(srv *http.Server, reg *prometheus.Registry, enableOpenMetrics bool)

func ProcessCiliumEndpointDeletion added in v1.15.7

func ProcessCiliumEndpointDeletion(pod *types.CiliumEndpoint) error

func ProcessFlow

func ProcessFlow(ctx context.Context, flow *pb.Flow) error

ProcessFlow processes a flow and updates metrics

func StartMetricsServer

func StartMetricsServer(srv *http.Server, log logrus.FieldLogger, metricsTLSConfig *certloader.WatchedServerConfig, grpcMetrics *grpc_prometheus.ServerMetrics) error

Types

type CiliumEndpointDeletionHandler added in v1.15.7

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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