apm

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2018 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Enable

func Enable(e bool)

Enable set apm status

func Enabled

func Enabled() bool

Enabled returns whether apm is enabled

Types

type Transaction added in v0.1.11

type Transaction struct {
	sync.Mutex
	Tx *elasticapm.Transaction
	// contains filtered or unexported fields
}

Transaction wraps transaction from elasticapm Default tracer and make it concurrency safe

func StartTransaction added in v0.1.11

func StartTransaction(name, transactionType string, startTime *time.Time) *Transaction

StartTransaction returns a mutex protected elasticapm.Transaction, with optional starting time

func (*Transaction) End added in v0.1.11

func (t *Transaction) End()

End completes the transaction

func (*Transaction) Recover added in v0.1.11

func (t *Transaction) Recover()

Recover returns an elasticapm.DefaultTracer.Recover function to be deferred

func (*Transaction) Result added in v0.1.11

func (t *Transaction) Result(value string)

Result set the result for the transaction

func (*Transaction) SetCustom added in v0.1.11

func (t *Transaction) SetCustom(key string, value interface{})

SetCustom set custom value for the transaction

func (*Transaction) SetError added in v0.1.11

func (t *Transaction) SetError(err error)

SetError set and send error fom the transaction

Jump to

Keyboard shortcuts

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