metrics

package
v0.0.0-...-a4ecc4f Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GinMetricsMiddleware

func GinMetricsMiddleware(prometheus *Prometheus) gin.HandlerFunc

Types

type Prometheus

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

Prometheus is a struct for prometheus metrics.

func NewPrometheus

func NewPrometheus(namespace, subsystem string) *Prometheus

NewPrometheus return an instance of Prometheus with registered metrics.

func (*Prometheus) RegisterAPIMetrics

func (p *Prometheus) RegisterAPIMetrics()

TODO: Refactor metrics + Add docker-compose with Prometheus and Grafana

func (*Prometheus) SetReponseStatus

func (p *Prometheus) SetReponseStatus(status int)

func (*Prometheus) SetReponseTime

func (p *Prometheus) SetReponseTime(path string) *prometheus.Timer

func (*Prometheus) SetTotalRequests

func (p *Prometheus) SetTotalRequests(path string)

Jump to

Keyboard shortcuts

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