apm

package
v0.34.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2023 License: GPL-3.0 Imports: 4 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 TraceHeader added in v0.29.0

type TraceHeader struct {
	Traceparent string
	TraceState  string
}

TraceHeader defines structure for distributed tracing headers

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, parentHeader *TraceHeader) (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) GetTraceContext added in v0.29.0

func (t *Transaction) GetTraceContext() (th *TraceHeader)

GetTraceContext gets info for distributed 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