apmcontext

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2021 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

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

	// 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

	// BodyCapturerFromContext returns a body capturer included in the context
	// using ContextWithBodyCapturer.
	//
	// BodyCapturerFromContext is used by apm.BodyCapturerFromContext.
	// It is a variable to allow other packages, such as apmot, to replace
	// it at package init time.
	BodyCapturerFromContext = DefaultBodyCapturerFromContext
)

Functions

func DefaultBodyCapturerFromContext added in v1.13.0

func DefaultBodyCapturerFromContext(ctx context.Context) interface{}

DefaultBodyCapturerFromContext is the default value for BodyCapturerFromContext.

func DefaultContextWithBodyCapturer added in v1.13.0

func DefaultContextWithBodyCapturer(ctx context.Context, bc interface{}) context.Context

DefaultContextWithBodyCapturer is the default value for ContextWithBodyCapturer.

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