Documentation
¶
Index ¶
- Constants
- func Get(key string) (uint, error)
- func GetKeys() []string
- func Increase[T constraints.Signed](key string, count T)
- func IncreaseOne(key string)
- func InitMetrics(cfg config.Config, ctx *util.ServerContext)
- func RegisterCollector(collector prometheus.Collector)
- func Set[T constraints.Signed](key string, value T)
Constants ¶
View Source
const ( // TotalCommands is the tracking key to get the number of all processed commands TotalCommands = "command_total" UnauthorizedCommands = "command_unauthorized" // UnknownCommands is the tracking key to get the number of all unknown commands (when the fallback-command is fired) UnknownCommands = "command_unknown" // Interactions is the tracking key to get the number of all processed interactions aka buttons Interactions = "interactions" )
Variables ¶
This section is empty.
Functions ¶
func Increase ¶
func Increase[T constraints.Signed](key string, count T)
Increase is increasing the stats counter
func IncreaseOne ¶
func IncreaseOne(key string)
IncreaseOne is increasing the stats counter of the given type by 1
func InitMetrics ¶ added in v2.2.10
func InitMetrics(cfg config.Config, ctx *util.ServerContext)
func RegisterCollector ¶ added in v2.3.19
func RegisterCollector(collector prometheus.Collector)
RegisterCollector adds a custom prometheus collector to the "/metrics" endpoint, e.g. to provide metrics of a plugin. It has to be called before the bot is started, e.g. in the Setup function of a plugin.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.