newrelic_beego

package module
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2022 License: MIT Imports: 7 Imported by: 0

README

NewRelic BeeGo

NewRelic BeeGo is "plug and play" package for monitoring (APM) BeeGo framework with NewRelic official agent

Supports HTTP endpoints

You can use exposed newrelic_beego.NewrelicAgent for custom monitoring, such as database, external calls, functions, etc.

Also, you can get NewRelic transaction per request from BeeGo context:

txn := ctx.Input.GetData("newrelic_transaction").(newrelic.Transaction)
defer txn.EndDatastore(txn.StartSegment(), datastore.Segment{
    // Product is the datastore type.
    // See the constants in api/datastore/datastore.go.
    Product: datastore.MySQL,
    // Collection is the table or group.
    Collection: "my_table",
    // Operation is the relevant action, e.g. "SELECT" or "GET".
    Operation: "SELECT",
})

Installation

dep ensure -v

Add _ "github.com/gtforge/newrelic_beego" as an import in main.go file

Available settings

  • appname = name of app in newrelic
  • newrelic_appname = same as appname
  • newrelic_license = NewRelic license key
  • newrelic_display_explicit_env = TRUE will display RU/IL/UK in the URL. FALSE will display just :env
  • newrelic_skip_paths = comma separated paths that shouldn't be logged by NewRelic.
    • Example: /api/v1/dosomething, /debug/
    • Note: matching is fuzzy, with above example any path that contains /debug/ will be skipped

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	NewrelicAgent newrelic.Application
)

Functions

func EndTransaction

func EndTransaction(ctx *context.Context)

func NameTransaction

func NameTransaction(ctx *context.Context)

func StartTransaction

func StartTransaction(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