otel

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Enabled        bool
	Endpoint       string
	Protocol       string
	Insecure       bool
	Timeout        time.Duration
	Headers        map[string]string
	Attributes     map[string]string
	BatchSize      int
	ExportInterval time.Duration
}

Config mirrors the public OTELConfig but for internal use

type Provider

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

Provider manages the OpenTelemetry log provider.

func Setup

func Setup(cfg Config, serviceName, version string) (*Provider, error)

Setup initializes OpenTelemetry logging.

func (*Provider) LoggerProvider

func (p *Provider) LoggerProvider() *sdklog.LoggerProvider

LoggerProvider returns the underlying sdklog.LoggerProvider

func (*Provider) Shutdown

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

Jump to

Keyboard shortcuts

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