otel

package
v0.11.3 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: EUPL-1.2 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTracerFromConfig

func NewTracerFromConfig(ctx context.Context, cfg TracerConfig) (ports.Tracer, func(), error)

NewTracerFromConfig creates a tracer from the given config. Returns NopTracer when Endpoint is empty (tracing disabled). The caller must defer the returned shutdown func.

Types

type Config

type Config struct {
	Endpoint    string
	ServiceName string
	Insecure    bool
}

Config holds OTLP gRPC exporter configuration for the tracer provider.

type TracerConfig

type TracerConfig struct {
	Endpoint    string
	ServiceName string
}

TracerConfig holds parameters for creating an OpenTelemetry tracer.

type TracerProvider

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

TracerProvider wraps the OTel SDK tracer provider with OTLP gRPC export. Created via otlptracegrpc.New(); use Shutdown to flush and stop.

func NewTracerProvider

func NewTracerProvider(ctx context.Context, cfg Config) (*TracerProvider, error)

func (*TracerProvider) Shutdown

func (p *TracerProvider) Shutdown(ctx context.Context) error

func (*TracerProvider) Start

func (p *TracerProvider) Start(ctx context.Context, spanName string) (context.Context, ports.Span)

Jump to

Keyboard shortcuts

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