metrics

package
v1.116.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultDuration = "24h"
)

Variables

This section is empty.

Functions

func AddJobTriggered

func AddJobTriggered(appName, pipeline string)

AddJobTriggered New job triggered for application

func AddRequestDuration

func AddRequestDuration(path, method string, duration time.Duration)

AddRequestDuration Add request duration for given endpoint

func DefaultBuckets

func DefaultBuckets() []float64

DefaultBuckets Holds the buckets used as default

Types

type Client

type Client interface {
	// GetCpuRequests returns a list of all pods with their CPU requets. The envName can be empty to return all environments.
	GetCpuRequests(ctx context.Context, appName, envName string, compNames []string) ([]LabeledResults, error)
	// GetCpuAverage returns a list of all pods with their average CPU usage. The envName can be empty to return all environments.
	GetCpuAverage(ctx context.Context, appName, envName string, compNames []string, duration string) ([]LabeledResults, error)
	// GetMemoryRequests returns a list of all pods with their Memory requets. The envName can be empty to return all environments.
	GetMemoryRequests(ctx context.Context, appName, envName string, compNames []string) ([]LabeledResults, error)
	// GetMemoryMaximum returns a list of all pods with their maximum Memory usage. The envName can be empty to return all environments.
	GetMemoryMaximum(ctx context.Context, appName, envName string, compNames []string, duration string) ([]LabeledResults, error)
}

type Handler

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

func NewHandler

func NewHandler(client Client) *Handler

NewHandler Constructor for Prometheus handler

func (*Handler) GetReplicaResourcesUtilization

func (pc *Handler) GetReplicaResourcesUtilization(ctx context.Context, radixClient versioned.Interface, appName, envName string) (*applicationModels.ReplicaResourcesUtilizationResponse, error)

GetReplicaResourcesUtilization Get used resources for the application. envName is optional. Will fallback to all copmonent environments to the application.

type LabeledResults

type LabeledResults struct {
	Value       float64
	Environment string
	Component   string
	Pod         string
}

Directories

Path Synopsis
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.
mock
Package mock is a generated GoMock package.
Package mock is a generated GoMock package.

Jump to

Keyboard shortcuts

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