telemetry

package
v0.0.0-...-e8ace5f Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewOTelTracer

func NewOTelTracer(tracer trace.Tracer) core.Tracer

NewOTelTracer creates a new OTelTracer from an OpenTelemetry trace.Tracer.

Types

type OTelSpan

type OTelSpan struct {
	// contains filtered or unexported fields
}

OTelSpan wraps the OpenTelemetry trace.Span to implement core.Span.

func (*OTelSpan) End

func (o *OTelSpan) End()

End completes the span.

func (*OTelSpan) Error

func (o *OTelSpan) Error(err error)

Error records an error in the span and marks it as failed.

func (*OTelSpan) RecordError

func (o *OTelSpan) RecordError(err error)

RecordError records an error in the span. This implements the core.Span interface.

func (*OTelSpan) SetAttr

func (o *OTelSpan) SetAttr(key string, value interface{})

SetAttr sets a key-value attribute on the span. It converts interface{} values to appropriate OTel attribute types.

func (*OTelSpan) SetAttributes

func (o *OTelSpan) SetAttributes(attributes map[string]any)

SetAttributes sets multiple attributes.

func (*OTelSpan) SetStatus

func (o *OTelSpan) SetStatus(code string, msg string)

SetStatus sets the status of the span.

type OTelTracer

type OTelTracer struct {
	// contains filtered or unexported fields
}

OTelTracer wraps the OpenTelemetry trace.Tracer to implement core.Tracer. This adapter encapsulates all OTel-specific logic, allowing the rest of the codebase to depend only on the high-level core.Tracer interface.

func (*OTelTracer) Start

func (o *OTelTracer) Start(ctx context.Context, name string) (context.Context, core.Span)

Start creates a new OTel span wrapped in the core.Span interface.

Jump to

Keyboard shortcuts

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