apm

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2019 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 *apm.Transaction
	// contains filtered or unexported fields
}

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

func StartTransaction added in v0.1.11

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

StartTransaction returns a mutex protected apm.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 apm.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 string)

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

Jump to

Keyboard shortcuts

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