Skip to content

hepsiburada/fiber-prometheus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fiber Prometheus

Middleware for go fiber v1.x

Installation

go get github.com/hepsiburada/fiber-prometheus

Examples

package main

import (
	"github.com/gofiber/fiber"
	"github.com/hepsiburada/fiber-prometheus"
)

func main() {
	app := fiber.New()

	p8sMiddleware := fiberprometheus.NewMiddleware("fiber","http","/metrics")
	p8sMiddleware.Register(app)

	app.Get("/", func(c *fiber.Ctx) {
		c.Send("Hello, Go World!")
    })
    
	app.Get("/testurl", func(c *fiber.Ctx) {
		c.Send("this is testurl.")
    })
    
	app.Listen(7000)
}