tracer

package
v1.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// TracerKey is a key for current tracer
	TracerKey = "otel-go-contrib-tracer-labstack-echo"

	// TracerName is name of the tracer
	TracerName = "go.opentelemetry.io/contrib/instrumentation/github.com/labstack/echo/otelecho"

	// TraceHdr is header name for ngc trace id
	TraceHdr = "X-Ngc-Trace-Id"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CurrentContextSpan

type CurrentContextSpan struct {
	Span oteltrace.Span
}

CurrentContextSpan is a thin wrapper around current context otel span

func (*CurrentContextSpan) End

func (c *CurrentContextSpan) End()

End stop the span from leakage

type TracerSpan

type TracerSpan struct {
}

TracerSpan holds span information

func NewTracerSpan

func NewTracerSpan() *TracerSpan

func (*TracerSpan) CreateChildInCurrentContext

func (c *TracerSpan) CreateChildInCurrentContext(ctx context.Context, spanName string) (context.Context, *CurrentContextSpan)

CreateChildInCurrentContext create a child span from specified span name and context

func (*TracerSpan) LoadFromContext

func (c *TracerSpan) LoadFromContext(ctx context.Context) (*CurrentContextSpan, bool)

LoadFromContext validate and get the spanner from current context

func (*TracerSpan) SetAttribute

func (c *TracerSpan) SetAttribute(cspan *CurrentContextSpan, key string, value interface{}) *CurrentContextSpan

SetAttribute set key value attribute to current span

Jump to

Keyboard shortcuts

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