Documentation ¶
Overview ¶
Package metrics exposes promotheus metrics
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Events = prometheus.NewCounterVec( prometheus.CounterOpts{ Name: "csf_events_count", Help: "Number of events received", }, []string{"matched"}, ) Reactions = prometheus.NewCounterVec( prometheus.CounterOpts{ Name: "csf_reactions_count", Help: "Number of reactions executed", }, []string{"status"}, ) Goroutines = prometheus.NewGaugeFunc( prometheus.GaugeOpts{ Subsystem: "runtime", Name: "csf_goroutines_count", Help: "Number of goroutines that currently exist.", }, func() float64 { return float64(runtime.NumGoroutine()) }, ) MemUsage = prometheus.NewGaugeFunc( prometheus.GaugeOpts{ Subsystem: "runtime", Name: "csf_mem_allocated_mb", Help: "System memory allocated to csf", }, func() float64 { var memStats runtime.MemStats runtime.ReadMemStats(&memStats) return float64(memStats.Sys / (1024 * 1024)) }, ) )
Functions ¶
func ServeMetrics ¶
func ServeMetrics(endpoint string)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.