owenthereal / negroni-gorelic

negroni_gorelic is NewRelic middleware for negroni framework.

Home Page:https://github.com/jingweno/negroni-gorelic

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

negroni-gorelic

New Relic middleware for the negroni framework.

Usage

package main

import (
	"fmt"
	"net/http"

	"github.com/codegangsta/negroni"
	"github.com/jingweno/negroni-gorelic"
)

func main() {
	r := http.NewServeMux()
	r.HandleFunc(`/`, func(w http.ResponseWriter, r *http.Request) {
		w.WriteHeader(http.StatusOK)
		fmt.Fprintf(w, "success!\n")
	})

	n := negroni.New()
	n.Use(negronigorelic.New("NEW_RELIC_LICENSE_KEY", "example-app", true))
	n.UseHandler(r)

	n.Run(":3000")
}

See a running example.

Credits

A shout out to @yvasiyarov for his awesome work of gorelic.

License

negroni-gorelic is released under the MIT license. See LICENSE.md.

About

negroni_gorelic is NewRelic middleware for negroni framework.

https://github.com/jingweno/negroni-gorelic

License:MIT License


Languages

Language:Go 100.0%