telemetry

package
v1.25.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 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 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)
}

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