https://github.com/halilylm/prometheusmiddleware
Prometheus middleware for fiber
https://github.com/halilylm/prometheusmiddleware
fiber fiber-framework golang metrics prometheus
Last synced: 5 months ago
JSON representation
Prometheus middleware for fiber
- Host: GitHub
- URL: https://github.com/halilylm/prometheusmiddleware
- Owner: halilylm
- Created: 2022-11-13T18:47:34.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-12-20T15:17:42.000Z (over 3 years ago)
- Last Synced: 2024-06-20T00:44:33.651Z (about 2 years ago)
- Topics: fiber, fiber-framework, golang, metrics, prometheus
- Language: Go
- Homepage:
- Size: 26.4 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Badges
[](https://choosealicense.com/licenses/mit/) [](https://goreportcard.com/report/github.com/halilylm/prometheusmiddleware)
# Buy me a coffee
I put a lot of effort into open-source projects. You can thank me by buying me a coffee :)
[](https://www.buymeacoffee.com/HxbwM8Z)
# Prometheus Middleware For Fiber v2
Middleware for prometheus to observe metrics.
You can also register other metrics and see them in path you define.
## Metrics available by deault
`app_http_requests_total`
`app_http_request_duration_seconds`
## Installation
```bash
go get github.com/halilylm/prometheusmiddleware@v0.1.0
```
## Usage/Examples
```golang
middlewarePath := "/metrics"
app := fiber.New()
registry := prometheus.NewRegistry()
middleware := prometheusmiddleware.NewPrometheusMiddleware(registry, middlewarePath)
middleware.Use(app)
```
## Feedback
If you have any feedback, please reach out to me at halilibrjim@gmail.com