internal

package
v0.0.0-...-fe23bbf Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2023 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetInstrument

func GetInstrument[T counters.Instrument](ctx context.Context, name string, factory InstrumentFactory, instruments *sync.Map) (*T, error)

Types

type Float64CounterFactory

type Float64CounterFactory struct{}

func (*Float64CounterFactory) CreateInstrument

func (f *Float64CounterFactory) CreateInstrument(name string) (counters.Instrument, error)

type Float64HistogramFactory

type Float64HistogramFactory struct{}

func (*Float64HistogramFactory) CreateInstrument

func (f *Float64HistogramFactory) CreateInstrument(name string) (counters.Instrument, error)

type Float64UpDownCounterFactory

type Float64UpDownCounterFactory struct{}

func (*Float64UpDownCounterFactory) CreateInstrument

func (f *Float64UpDownCounterFactory) CreateInstrument(name string) (counters.Instrument, error)

type InstrumentFactory

type InstrumentFactory interface {
	CreateInstrument(name string) (counters.Instrument, error)
}

type Int64CounterFactory

type Int64CounterFactory struct{}

func (*Int64CounterFactory) CreateInstrument

func (f *Int64CounterFactory) CreateInstrument(name string) (counters.Instrument, error)

type Int64HistogramFactory

type Int64HistogramFactory struct{}

func (*Int64HistogramFactory) CreateInstrument

func (f *Int64HistogramFactory) CreateInstrument(name string) (counters.Instrument, error)

type Int64UpDownCounterFactory

type Int64UpDownCounterFactory struct{}

func (*Int64UpDownCounterFactory) CreateInstrument

func (f *Int64UpDownCounterFactory) CreateInstrument(name string) (counters.Instrument, error)

type MetricCollectorUseCase

type MetricCollectorUseCase interface {
	CountInt(ctx context.Context, name string, incr int64, attr ...observability.KeyValue) error
	UpDownCountInt(ctx context.Context, name string, incr int64, attr ...observability.KeyValue) error
	HistogramInt(ctx context.Context, name string, incr int64, attr ...observability.KeyValue) error

	CountFloat(ctx context.Context, name string, incr float64, attr ...observability.KeyValue) error
	UpDownCountFloat(ctx context.Context, name string, incr float64, attr ...observability.KeyValue) error
	HistogramFloat(ctx context.Context, name string, incr float64, attr ...observability.KeyValue) error

	RegisterIntObservableGauge(ctx context.Context, name string, f observers.Int64Callback) error
	RegisterIntObservableCounter(ctx context.Context, name string, f observers.Int64Callback) error
	RegisterIntObservableUpDownCounter(ctx context.Context, name string, f observers.Int64Callback) error

	RegisterFloatObservableGauge(ctx context.Context, name string, f observers.Float64Callback) error
	RegisterFloatObservableCounter(ctx context.Context, name string, f observers.Float64Callback) error
	RegisterFloatObservableUpDownCounter(ctx context.Context, name string, f observers.Float64Callback) error
}

func NewMetricCollectorUseCase

func NewMetricCollectorUseCase(ctx context.Context) (MetricCollectorUseCase, error)

Jump to

Keyboard shortcuts

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