Epimetheus is a lightweight wrpper around Prometheus Go client and Statsd Go client which makes measuring communication, functions, background jobs, etc. easier, simultaneously with both Prometheus and Statsd.
go get -u github.com/cafebazaar/epimetheus
epimetheusServer := epimetheus.NewEpimetheusServer(config)
go epimetheusServer.Listen()
epi := epimetheus.NewEpimetheus(config)
commTimer := epi.CommTimer
go epimetheusServer.Listen()
epi := epimetheus.NewEpimetheus(config)
timerWithCounter := epi.NewTimerWithCounter("req1", string[]{"label1"})
rtc := timerWithCounter.Start()
// Do some work here
rtc.Done("dispatch")
epi := epimetheus.NewEpimetheus(config)
timer := epi.NewTimer("req1", string[]{"label1"})
t := timer.Start()
// Do some work here
t.Done("dispatch")
epi := epimetheus.NewEpimetheus(config)
counter := epi.NewCounter("req1", string[]{"label1"})
// Do some work here
c.Inc("dispatch")
Epimetheus uses Viper as it's config engine. Template should be something like this:
stats:
prometheus:
enabled: true
port: 1234
statsd:
enabled: true
port: 5678
host: "w.x.y.z"
namespace: search
system-name: octopus
Documents are available at https://godoc.org/github.com/cafebazaar/epimetheus
- Prometheus Go clinet - The underlying library for Prometheus
- Statsd Go client - The underlying library for Statsd
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
We use SemVer for versioning. For the versions available, see the tags on this repository.
- Improve documentation
- Add tests
- Ramtin Rostami - Initial work - rrostami
- Pedram Teymoori - Initial work - pedramteymoori
- Parsa abdollahi - Initial work -
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details
- Sepehr nematollahi Epimetheus typography designer
Made with ❤ in Cafebazaar search