Skip to content

Epimetheus is a lightweight wrpper around Prometheus Go client and Statsd Go client which makes measuring communication, functions, background jobs, etc. easier.

License

Notifications You must be signed in to change notification settings

cafebazaar/epimetheus

Repository files navigation

Epimetheus

Mnemosyne

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.

Getting Started

Installing

go get -u github.com/cafebazaar/epimetheus

Initialize server

epimetheusServer := epimetheus.NewEpimetheusServer(config)
go epimetheusServer.Listen()

Predefined metrics

epi := epimetheus.NewEpimetheus(config)
commTimer := epi.CommTimer
go epimetheusServer.Listen()

Measuring duration and count

epi := epimetheus.NewEpimetheus(config)
timerWithCounter := epi.NewTimerWithCounter("req1", string[]{"label1"})
rtc := timerWithCounter.Start()
// Do some work here
rtc.Done("dispatch")

Measuring duration

epi := epimetheus.NewEpimetheus(config)
timer := epi.NewTimer("req1", string[]{"label1"})
t := timer.Start()
// Do some work here
t.Done("dispatch")

Measuring count

epi := epimetheus.NewEpimetheus(config)
counter := epi.NewCounter("req1", string[]{"label1"})
// Do some work here
c.Inc("dispatch")

Configuration

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

Documentation

Documents are available at https://godoc.org/github.com/cafebazaar/epimetheus

Built With

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Roadmap

- Improve documentation
- Add tests

Authors

  • 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.

License

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

Acknowledgments

Made with in Cafebazaar search

About

Epimetheus is a lightweight wrpper around Prometheus Go client and Statsd Go client which makes measuring communication, functions, background jobs, etc. easier.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages