Documentation ¶
Index ¶
- Variables
- func RegisterRequest(startTime int64, method, handler string, status int)
- func SetCPUUsage(serviceName, podName string, value int64)
- func SetMemoryUsage(serviceName, podName string, value int64)
- func SetPendingWorkflows(value int64)
- func SetRunningWorkflows(value int64)
- func UpdatePodMetrics() error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Metrics *prometheus.Registry RunningWorkflows = prometheus.NewGauge( prometheus.GaugeOpts{ Name: "running_workflows", Help: "Number of currently running workflows", }, ) PendingWorkflows = prometheus.NewGauge( prometheus.GaugeOpts{ Name: "pending_workflows", Help: "Number of currently pending workflows", }, ) RequestTotal = prometheus.NewCounterVec( prometheus.CounterOpts{ Name: "request_total", Help: "Number of requests", }, []string{"method", "handler", "status"}, ) CPU = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Name: "cpu", Help: "CPU usage", }, []string{"service", "pod"}, ) Memory = prometheus.NewGaugeVec( prometheus.GaugeOpts{ Name: "memory", Help: "Memory usage", }, []string{"service", "pod"}, ) ResponseTime = prometheus.NewHistogramVec( prometheus.HistogramOpts{ Name: "api_response_time", Help: "The API response time in seconds", Buckets: prometheus.LinearBuckets(0.2, 0.2, 10), }, []string{"method", "handler", "status"}, ) )
Functions ¶
func RegisterRequest ¶
func SetCPUUsage ¶
func SetMemoryUsage ¶
func SetPendingWorkflows ¶
func SetPendingWorkflows(value int64)
func SetRunningWorkflows ¶
func SetRunningWorkflows(value int64)
func UpdatePodMetrics ¶
func UpdatePodMetrics() error
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.