otel

package
v1.0.16 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSpanCodeAttributes

func GetSpanCodeAttributes(skip int) []otelattr.KeyValue

func InvokeWithSpan

func InvokeWithSpan(ctx context.Context,
	tracer oteltrace.Tracer,
	spanName string,
	next func(ctx context.Context) error,
	opts ...oteltrace.SpanStartOption) error

InvokeWithSpan creates a span and passes it to the downstream function (next) that it invokes for tracing with OpenTelemetry which includes properly recording an error and setting status upon success

func InvokeWithSpanWithSkip

func InvokeWithSpanWithSkip(ctx context.Context,
	tracer oteltrace.Tracer,
	spanName string,
	next func(ctx context.Context) error,
	skip int,
	opts ...oteltrace.SpanStartOption) error

InvokeWithSpanWithSkip creates a span and passes it to the downstream function (next) that it invokes for tracing with OpenTelemetry which includes properly recording an error and setting status upon success 'skip' parameter tells "how many levels of stack to unwind from this call to determine 'code.function' and 'code.lineno'".

Types

This section is empty.

Jump to

Keyboard shortcuts

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