Help us shape the future of Go! Take the 2026 Go Developer Survey

telemetry

package
v1.27.1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Int64Counter added in v1.26.0

type Int64Counter interface {
	Add(ctx context.Context, incr int64, options ...otelmetric.AddOption)
}

type Int64Histogram

type Int64Histogram interface {
	Record(ctx context.Context, incr int64, options ...otelmetric.RecordOption)
}

type Int64UpDownCounter

type Int64UpDownCounter interface {
	Add(ctx context.Context, incr int64, options ...otelmetric.AddOption)
}

type Telemetry

type Telemetry interface {
	TraceStart(
		ctx context.Context,
		name string,
		opts ...oteltrace.SpanStartOption,
	) (context.Context, oteltrace.Span)
	NewLogHandler(name string) slog.Handler
	Shutdown(ctx context.Context) error

	NewInt64Histogram(
		name string,
		unit string,
		description string,
		opts ...otelmetric.HistogramOption,
	) (Int64Histogram, error)

	NewInt64UpDownCounter(
		name string,
		unit string,
		description string,
		opts ...otelmetric.HistogramOption,
	) (Int64UpDownCounter, error)

	NewInt64Counter(
		name string,
		unit string,
		description string,
		opts ...otelmetric.Int64CounterOption,
	) (Int64Counter, error)
}

func New

func New(ctx context.Context, name, version string) (Telemetry, error)

func NewNoop

func NewNoop() Telemetry

Jump to

Keyboard shortcuts

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