metrics

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: Apache-2.0 Imports: 19 Imported by: 23

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureMetrics

func ConfigureMetrics(ctx context.Context, userMetricsConfig metricsConfig) error

ConfigureMetrics takes the input values from the user, starts the metrics server, as well as creates service and routes.

func GenerateRoute

func GenerateRoute(s *v1.Service, path string) *routev1.Route

GenerateRoute creates a route to expose the metrics based on the specified path.

func GenerateService

func GenerateService(port int32, portName string, serviceName, serviceNamespace string, serviceLabel map[string]string) (*v1.Service, error)

GenerateService returns the static service at specified port

func GenerateServiceMonitor

func GenerateServiceMonitor(s *v1.Service) *monitoringv1.ServiceMonitor

GenerateServiceMonitor generates a prometheus-operator ServiceMonitor object based on the passed Service object.

func NewBuilder

func NewBuilder(namespace, serviceName string) *metricsConfigBuilder

NewBuilder initializes the configuration builder for a given namespace and service name

func RegisterMetrics

func RegisterMetrics(metricsRegisterer prometheus.Registerer, list []prometheus.Collector) error

RegisterMetrics takes the list of metrics to be registered from the user and registers to prometheus.

func StartMetrics

func StartMetrics(config metricsConfig) error

StartMetrics starts the server based on the metricsConfig provided by the user.

Types

This section is empty.

Jump to

Keyboard shortcuts

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