diff --git a/deplist b/deplist index 423de49ea..ef9f0537c 100644 --- a/deplist +++ b/deplist @@ -53,12 +53,6 @@ github.com/mattn/anko/vm github.com/mattn/go-sqlite3 github.com/microcosm-cc/bluemonday github.com/mitchellh/go-homedir -github.com/newrelic/go-agent -github.com/newrelic/go-agent/internal -github.com/newrelic/go-agent/internal/jsonx -github.com/newrelic/go-agent/internal/logger -github.com/newrelic/go-agent/internal/sysinfo -github.com/newrelic/go-agent/internal/utilization github.com/pkg/errors github.com/russross/blackfriday github.com/satori/go.uuid diff --git a/middleware/new_relic.go b/middleware/new_relic.go deleted file mode 100644 index ee26cb66d..000000000 --- a/middleware/new_relic.go +++ /dev/null @@ -1,37 +0,0 @@ -package middleware - -import ( - "fmt" - - "github.com/gobuffalo/buffalo" - newrelic "github.com/newrelic/go-agent" -) - -// NewRelic returns a piece of buffalo.Middleware that can -// be used to report requests to NewRelic. You must pass in your -// NewRelic key and a name for your application. If the key -// passed in is blank, i.e. loading from an ENV, then the middleware -// is skipped and the chain continues on like normal. Useful -// for development. -func NewRelic(key, name string) buffalo.MiddlewareFunc { - mf := func(next buffalo.Handler) buffalo.Handler { - return next - } - if key == "" { - return mf - } - fmt.Printf("Setting up New Relic %s\n", key) - config := newrelic.NewConfig(name, key) - app, err := newrelic.NewApplication(config) - if err != nil { - return mf - } - - return func(next buffalo.Handler) buffalo.Handler { - return func(c buffalo.Context) error { - tx := app.StartTransaction(c.Request().URL.String(), c.Response(), c.Request()) - defer tx.End() - return next(c) - } - } -}