telemetry

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2025 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultShutdownTimeout = 10 * time.Second
	DefaultShutdownHandler = true
	DefaultSetLogProvider  = true

	DefaultMetricPeriodicReaderInterval = 30 * time.Second
	DefaultMetricPeriodicReaderTimeout  = 10 * time.Second

	DefaultLogExportInterval = 30 * time.Second
	DefaultLogExportTimeout  = 10 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Interface

type Interface interface {
	GetTraceProvider() *traceSdk.TracerProvider
	GetMetricProvider() *metricSdk.MeterProvider
	GetLogProvider() *logSdk.LoggerProvider
	GetTracer() otelTrace.Tracer
	GetMeter() otelMetric.Meter
	GetLogger() otelLog.Logger
	GetPropagator() propagation.TextMapPropagator
	GetMetricsHttpHandler() http.Handler
	GetShutdownTimeout() time.Duration
	GetShutdownHandler() bool
	ForceFlush(ctx context.Context, reason string) error
	Shutdown(ctx context.Context, reason string) error
	ShutdownHandler(sig os.Signal) error
}

func New

func New(opts ...Option) Interface

func NewDefaultInsecureOtlpGrpc

func NewDefaultInsecureOtlpGrpc(ctx context.Context, endpoint string) Interface

type Option

type Option func(*t)

func WithLogProvider

func WithLogProvider(provider *logSdk.LoggerProvider) Option

func WithLogProviderOptions

func WithLogProviderOptions(opts ...logProvider.Option) Option

func WithMetricProvider

func WithMetricProvider(provider *metricSdk.MeterProvider) Option

func WithMetricProviderOptions

func WithMetricProviderOptions(opts ...metricProvider.Option) Option

func WithPropagator

func WithPropagator(propagator propagation.TextMapPropagator) Option

func WithShutdownTimeout

func WithShutdownTimeout(timeout time.Duration) Option

func WithTraceProvider

func WithTraceProvider(provider *traceSdk.TracerProvider) Option

func WithTraceProviderOptions

func WithTraceProviderOptions(opts ...traceProvider.Option) Option

func WithoutSetLogProvider

func WithoutSetLogProvider() Option

func WithoutShutdownHandler

func WithoutShutdownHandler() Option

Jump to

Keyboard shortcuts

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