Documentation ¶
Index ¶
- Variables
- func FinishNRTransaction(ctx context.Context, err error)
- func GetNewRelicApp() *newrelic.Application
- func GetNewRelicTransactionFromContext(ctx context.Context) *newrelic.Transaction
- func GetOrStartNew(ctx context.Context, name string) (*newrelic.Transaction, context.Context)
- func IgnoreNRTransaction(ctx context.Context)
- func SetNewRelicApp(nr *newrelic.Application)
- func StartNRTransaction(path string, ctx context.Context, req *http.Request, w http.ResponseWriter) context.Context
- func StoreNewRelicTransactionToContext(ctx context.Context, t *newrelic.Transaction) context.Context
Constants ¶
This section is empty.
Variables ¶
var ( // NewRelicApp is the reference for newrelic application NewRelicApp *newrelic.Application )
Functions ¶
func FinishNRTransaction ¶
FinishNRTransaction finishes an existing transaction if there is no transaction in the context, it does nothing
func GetNewRelicApp ¶
func GetNewRelicApp() *newrelic.Application
func GetNewRelicTransactionFromContext ¶
func GetNewRelicTransactionFromContext(ctx context.Context) *newrelic.Transaction
GetNewRelicTransactionFromContext fetches the new relic transaction that is stored in the context if there is no transaction in the context, it returns nil
func GetOrStartNew ¶
GetOrStartNew returns a new relic transaction from context if there is no transaction in the context, it starts a new transaction
func IgnoreNRTransaction ¶
IgnoreNRTransaction ignores this NR trasaction and prevents it from being reported can be used to ignore health check transactions etc
func SetNewRelicApp ¶
func SetNewRelicApp(nr *newrelic.Application)
func StartNRTransaction ¶
func StartNRTransaction(path string, ctx context.Context, req *http.Request, w http.ResponseWriter) context.Context
StartNRTransaction starts a new newrelic transaction if there is already a transaction in the context, it will start a child transaction
func StoreNewRelicTransactionToContext ¶
func StoreNewRelicTransactionToContext(ctx context.Context, t *newrelic.Transaction) context.Context
StoreNewRelicTransactionToContext stores a new relic transaction object to context if there is already a transaction in the context, it will be overwritten by the new one passed in the argument
Types ¶
This section is empty.