ootel

package module
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2026 License: MIT Imports: 16 Imported by: 8 modules, 5 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

ootel

ootel is an "opinionated" opentelemetry initializer.

Currently the only supported exporters are OTLP gRPC (traces) and Prometheus (metrics)

Documentation

Index

Constants

View Source
const (
	ExporterTypePrometheus = "prometheus"
	ExporterTypeOTLPGRPC   = "otlpgrpc"
	ExporterTypeOTLPHTTP   = "otlphttp"
)

Variables

This section is empty.

Functions

func NewMetricConfig

func NewMetricConfig(enabled bool, exporterType string, serverPort int) *metricConfig

func NewTraceConfig

func NewTraceConfig(enabled bool, sampleRate float64, serviceName, serviceVersion string) *traceConfig

Types

type OotelClient

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

func NewOotelClient

func NewOotelClient(options ...OotelClientOption) *OotelClient

func (*OotelClient) Init

func (oc *OotelClient) Init(ctx context.Context) (func(context.Context) error, error)

type OotelClientOption

type OotelClientOption func(*OotelClient)

func WithMetricConfig

func WithMetricConfig(mc *metricConfig) OotelClientOption

func WithTraceConfig

func WithTraceConfig(tc *traceConfig) OotelClientOption

Directories

Path Synopsis
example
otlpgrpc command
prometheus command

Jump to

Keyboard shortcuts

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