apmcontext

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ContextWithSpan takes a context and span and returns a new context
	// from which the span can be extracted using SpanFromContext.
	//
	// ContextWithSpan is used by apm.ContextWithSpan. It is a
	// variable to allow other packages, such as apmot, to replace it
	// at package init time.
	ContextWithSpan = DefaultContextWithSpan

	// ContextWithTransaction takes a context and transaction and returns
	// a new context from which the transaction can be extracted using
	// TransactionFromContext.
	//
	// ContextWithTransaction is used by apm.ContextWithTransaction.
	// It is a variable to allow other packages, such as apmot, to replace
	// it at package init time.
	ContextWithTransaction = DefaultContextWithTransaction

	// SpanFromContext returns a span included in the context using
	// ContextWithSpan.
	//
	// SpanFromContext is used by apm.SpanFromContext. It is a
	// variable to allow other packages, such as apmot, to replace it
	// at package init time.
	SpanFromContext = DefaultSpanFromContext

	// TransactionFromContext returns a transaction included in the context
	// using ContextWithTransaction.
	//
	// TransactionFromContext is used by apm.TransactionFromContext.
	// It is a variable to allow other packages, such as apmot, to replace
	// it at package init time.
	TransactionFromContext = DefaultTransactionFromContext
)

Functions

func DefaultContextWithSpan

func DefaultContextWithSpan(ctx context.Context, span interface{}) context.Context

DefaultContextWithSpan is the default value for ContextWithSpan.

func DefaultContextWithTransaction

func DefaultContextWithTransaction(ctx context.Context, tx interface{}) context.Context

DefaultContextWithTransaction is the default value for ContextWithTransaction.

func DefaultSpanFromContext

func DefaultSpanFromContext(ctx context.Context) interface{}

DefaultSpanFromContext is the default value for SpanFromContext.

func DefaultTransactionFromContext

func DefaultTransactionFromContext(ctx context.Context) interface{}

DefaultTransactionFromContext is the default value for TransactionFromContext.

Types

This section is empty.

Jump to

Keyboard shortcuts

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