metrics

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2024 License: BSD-3-Clause Imports: 7 Imported by: 0

README

Metrics (prometheus)

The metrics integration makes use of the "github.com/prometheus/client_golang/prometheus package. It uses the prometheus.DefaultRegisterer.

So you can add metrics as simple as in the following code example:

var currentRequests = promauto.NewGaugeVec(
	prometheus.GaugeOpts{
		Name: "fiber_requests_current",
		Help: "The current number of active requests",
	},
	[]string{"method", "path"},
)

UseFiberEndpoint

The UseFiberEndpoint adds the /metrics route to your fiber app.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFiberMiddleware

func NewFiberMiddleware() fiber.Handler

func UseFiberEndpoint

func UseFiberEndpoint(app *fiber.App)

Types

This section is empty.

Jump to

Keyboard shortcuts

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