metrics

package
v1.45.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2024 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetExporter added in v1.41.0

func GetExporter(ctx context.Context, cfg *config.MetricsConfig) (sdkmetric.Reader, func(context.Context) error, error)

func GetResources added in v1.42.0

func GetResources(ctx context.Context) (*resource.Resource, error)

Types

type MustFloat64Meter added in v1.18.2

type MustFloat64Meter interface {
	// Counter returns a new instrument identified by name and configured
	// with options. The instrument is used to synchronously record increasing
	// float64 measurements during a computational operation.
	Counter(name string, options ...metric.Float64CounterOption) metric.Float64Counter
	// UpDownCounter returns a new instrument identified by name and
	// configured with options. The instrument is used to synchronously record
	// float64 measurements during a computational operation.
	UpDownCounter(name string, options ...metric.Float64UpDownCounterOption) metric.Float64UpDownCounter
	// Histogram returns a new instrument identified by name and
	// configured with options. The instrument is used to synchronously record
	// the distribution of float64 measurements during a computational operation.
	Histogram(name string, options ...metric.Float64HistogramOption) metric.Float64Histogram
}

MustFloat64Meter is a meter/Meter which panics if it cannot successfully build the requestd counter, upDownCounter or histogram.

func MustFloat64 added in v1.18.2

func MustFloat64() MustFloat64Meter

MustFloat64 returns an instrument provider based on the global Meter. The returns provider panics instead of returning an error when it cannot build a required counter, upDownCounter or histogram.

type MustInt64Meter added in v1.18.2

type MustInt64Meter interface {
	// Counter returns a new instrument identified by name and configured
	// with options. The instrument is used to synchronously record increasing
	// int64 measurements during a computational operation.
	Counter(name string, options ...metric.Int64CounterOption) metric.Int64Counter
	// UpDownCounter returns a new instrument identified by name and
	// configured with options. The instrument is used to synchronously record
	// int64 measurements during a computational operation.
	UpDownCounter(name string, options ...metric.Int64UpDownCounterOption) metric.Int64UpDownCounter
	// Histogram returns a new instrument identified by name and
	// configured with options. The instrument is used to synchronously record
	// the distribution of int64 measurements during a computational operation.
	Histogram(name string, options ...metric.Int64HistogramOption) metric.Int64Histogram
}

MustInt64Meter is a meter/Meter which panics if it cannot successfully build the requestd counter, upDownCounter or histogram.

func MustInt64 added in v1.18.2

func MustInt64() MustInt64Meter

MustInt64 returns an instrument provider based on the global Meter. The returns provider panics instead of returning an error when it cannot build a required counter, upDownCounter or histogram.

Jump to

Keyboard shortcuts

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