Skip to content

Go Prometheus is a package that allows you to integrate Prometheus, a popular open-source monitoring and alerting toolkit, into your Golang applications. Prometheus is widely used for monitoring various aspects of software systems, including metrics, time series data, and alerting.

License

Notifications You must be signed in to change notification settings

tech-djoin/go-prometheus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-prometheus

License: MIT

Go Prometheus is a package that allows you to integrate Prometheus, a popular open-source monitoring and alerting toolkit, into your golang applications. Prometheus is widely used for monitoring various aspects of software systems, including metrics, time series data, and alerting. This package uses Memory to do the client side aggregation.

Installation

Get Go Prometheus package on your project:

go get github.com/tech-djoin/go-prometheus

Usage

This packages provides a middleware using Echo which can be added as a global middleware or as a single route.

// in server file or anywhere middleware should be registered
e.Use(goprometheus.MetricCollector())
// in route file or anywhere route should be registered
router.Echo.GET("api/v1/posts", handler, goprometheus.MetricCollector())

Exporting Metrics

To exposes all metrics gathered by collectors, you need a route to access all metrics.

router.Echo.GET("/metrics", echo.WrapHandler(promhttp.Handler()))

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Contributors

About

Go Prometheus is a package that allows you to integrate Prometheus, a popular open-source monitoring and alerting toolkit, into your Golang applications. Prometheus is widely used for monitoring various aspects of software systems, including metrics, time series data, and alerting.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages