otelsetup

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 18, 2025 License: MIT Imports: 17 Imported by: 0

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"`
	EnableMetrics  bool   `yaml:"enableMetrics"`
	Environment    string `yaml:"environment"`
	MetricsPort    string `yaml:"metricsPort"`
}

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