beego_gorelic

package module
v0.0.0-...-9aa1d57 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2016 License: BSD-3-Clause Imports: 6 Imported by: 2

README

beego_gorelic

beego_gorelic is NewRelic middleware for beego framework.

Installation

  • Run "go get github.com/yvasiyarov/beego_gorelic"
  • Open routers/router.go file and:
    • Add "github.com/yvasiyarov/beego_gorelic" to import statement
    • Add beego_gorelic.InitNewrelicAgent() call to your init() function
  • Add NewrelicLicense key to conf/app.conf
  • Optionally add NewrelicVerbose=true if you wanna to see metrics, reported by NewRelic Agent

If your application use runmode=dev, then NewrelicVerbose will be set to true by default

Optional Configuration

The following key can be added to the conf/app.conf to prepend or append the runmode to the appname provided to NewRelic (uses a dash as separator). If not defined, the NewRelic appname is the beego appname.

NewrelicAppnameRunmode=prepend

reports runmode-appname to NewRelic

NewrelicAppnameRunmode=append

reports appname-runmode to NewRelic

Documentation

Index

Constants

View Source
const (
	SEPARATOR = "-"
)

Variables

This section is empty.

Functions

func InitNewRelicTimer

func InitNewRelicTimer(ctx *context.Context)

func InitNewrelicAgent

func InitNewrelicAgent()

func ReportMetricsToNewrelic

func ReportMetricsToNewrelic(ctx *context.Context)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL