metrics

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector struct {
	Registry *prometheus.Registry
	// contains filtered or unexported fields
}

Collector is metrics collector.

func NewCollector

func NewCollector(logger logrus.FieldLogger) *Collector

NewCollector creates new Collector and registers metrics.

func (*Collector) IncAuthorizationCanceled

func (c *Collector) IncAuthorizationCanceled(app string)

func (*Collector) IncAuthorizationConfirmed

func (c *Collector) IncAuthorizationConfirmed(app string)

func (*Collector) IncAuthorizationRequested

func (c *Collector) IncAuthorizationRequested(app string)

func (*Collector) IncGeneratedToken

func (c *Collector) IncGeneratedToken(app string)

func (*Collector) MetricsHandler

func (c *Collector) MetricsHandler() http.Handler

MetricsHandler returns Prometheus HTTP metrics API handler.

func (*Collector) MetricsMiddleware

func (c *Collector) MetricsMiddleware(h http.Handler) http.Handler

MetricsMiddleware returns middleware used for collecting metrics.

Jump to

Keyboard shortcuts

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