newrelic_beego

package module
v0.0.0-...-a373e95 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2018 License: MIT Imports: 7 Imported by: 0

README

newrelic_beego

newrelic_beego is "plug and play" package for monitoring(APM) beego framework with newrelic offical agent

Support http endpoints

Can Get newrelic_beego.NewrelicAgent for custom monitoring(database,external call, func etc..) 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

go get github.com/sergeylanzman/newrelic_beego"

Add _ "github.com/sergeylanzman/newrelic_beego" to import in main.go file

Settings

- appname = name of app in newrelic
- newrelic_license = newrelic license

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