Documentation
¶
Overview ¶
Package otil contains OpenTelemetry utilities.
These utilities are for convenience and do not have to be used. The OpenTelemetry API is canonical, and this package interoperates with it.
To add instrumentation to a function:
func MyFunc(ctx context.Context) (err error) { ctx, span := otil.FuncSpan(ctx) defer func() { otil.EndSpan(span, err) }() // rest of function }
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ValuesKey = attribute.Key("org.chromium.code.values")
ValuesKey represents a slice of string values to attach to a span or event. This can be the arguments to a function or values relevant to an event.
Functions ¶
func AddHTTP ¶
AddHTTP adds tracing and context propagation integration to an HTTP client. The context provides the parent span for any child request spans.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.