metrics

package
v0.0.0-...-5da754f Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (

	// SendAmount tracks metrics related to Send API of dispendium. It tracks the spending output.
	SendAmount = promauto.NewHistogramVec(prometheus.HistogramOpts{
		Namespace: "dispendium",
		Subsystem: "sending",
		Name:      "amount",
		Help:      "Tracks the send amounts for the api",
	}, []string{"instance"})

	// Sending tracks the number of active sends from lbrycrd at a time
	Sending = promauto.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: "dispendium",
		Subsystem: "sending",
		Name:      "now",
		Help:      "number active sends happening now",
	}, []string{"instance"})

	// Balance tracks the balance of each wallet whenever we call get balance.
	Balance = promauto.NewGaugeVec(prometheus.GaugeOpts{
		Namespace: "dispendium",
		Subsystem: "lbrycrd",
		Name:      "balance",
		Help:      "Tracks the send durations for the api",
	}, []string{"instance"})
)

Functions

func APIDuration

func APIDuration(start time.Time, api string)

APIDuration logs the time it takes to complete the api with the respective metric

func SendDuration

func SendDuration(start time.Time, instance string)

SendDuration logs the time it takes to send with the respective metric

Types

This section is empty.

Jump to

Keyboard shortcuts

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