Riemann middleware for martini framework.
Logs the following information:
- The time the request took
- The http status code
- The requested path
To install the package for use in your own programs:
go get github.com/bigdatadev/goryman
go get github.com/bigdatadev/gorymartini
First we'll need to import the library:
import (
"github.com/bigdatadev/goryman"
"github.com/bigdatadev/gorymartini"
"github.com/go-martini/martini"
)
Next we'll need to create the client and martini handler:
c, h := gorymartini.NewGoryMartini("localhost:5555")
err := c.Connect()
if c == nil || h == nil {
panic(err)
}
Don't forget to close the client connection when you're done:
defer c.Close()
Now we simply need to use the handler:
m := martini.New()
// ...
m.Use(h)
m.Run()
Just send me a pull request. Please take a look at the project issues and see how you can help. Here are some tips:
- please add more tests.
- please check your syntax.
Christopher Gilbert
- Web: http://cjgilbert.me
- Twitter: @bigdatadev
- Linkedin: /in/christophergilbert
See LICENSE document