otelsetup

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2026 License: MIT Imports: 19 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToPluginConfig

func ToPluginConfig(cfg *Config) *plugin.Config

ToPluginConfig converts Config to plugin.Config format.

Types

type Config

type Config struct {
	ServiceName       string `yaml:"serviceName"`
	ServiceVersion    string `yaml:"serviceVersion"`
	Environment       string `yaml:"environment"`
	Domain            string `yaml:"domain"`
	DeviceID          string `yaml:"deviceID"`
	EnableMetrics     bool   `yaml:"enableMetrics"`
	EnableTracing     bool   `yaml:"enableTracing"`
	EnableLogs        bool   `yaml:"enableLogs"`
	OtlpEndpoint      string `yaml:"otlpEndpoint"`
	TimeInterval      int64  `yaml:"timeInterval"`
	AuditFieldsConfig string `yaml:"auditFieldsConfig"`
	Producer          string `yaml:"producer"`
	ProducerType      string `yaml:"producerType"`
	CacheTTL          int64  `yaml:"cacheTTL"`
}

Config represents OpenTelemetry related configuration.

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns sensible defaults for telemetry configuration.

type Setup

type Setup struct{}

Setup wires the telemetry provider. This is the concrete implementation behind the OtelSetupMetricsProvider interface.

func (Setup) New

func (Setup) New(ctx context.Context, cfg *Config) (*telemetry.Provider, error)

New initializes the underlying telemetry provider. The returned provider exposes the HTTP handler and shutdown hooks that the core application can manage directly.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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