metrics

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package metrics handles the aggregated stats that can be reported to a metrics exporter for bot monitoring. This only contains functionality for initializing and managing the stats themselves - the user is expected to set up an OpenCensus exporter.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Recorder

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

Recorder is our backend-independent metrics recorder. This should be created with NewRecorder().

func NewRecorder

func NewRecorder() (*Recorder, error)

NewRecorder creates a Recorder with its metrics initialized.

func (*Recorder) RecordConnectedServers

func (r *Recorder) RecordConnectedServers(count int64)

RecordConnectedServers records the number of currently connected servers (guilds).

func (*Recorder) RecordRunningPoms

func (r *Recorder) RecordRunningPoms(count int64)

RecordRunningPoms records the number of currently running pomodoros.

func (*Recorder) RecordStartPom

func (r *Recorder) RecordStartPom()

RecordStartPom records the start of a pomodoro.

Jump to

Keyboard shortcuts

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