metric

package module
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: May 24, 2022 License: MIT Imports: 16 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudMetricsMeterProvider added in v0.2.1

type CloudMetricsMeterProvider struct {
	// contains filtered or unexported fields
}

CloudMetricsMeterProvider creates Metric meters.

func (CloudMetricsMeterProvider) Meter added in v0.2.1

Meter produces a new CloudMetrics meter. The produced Meter pushes metrics to Cloud Metrics every 30 seconds.

type CloudMetricsMeterProviderParams added in v0.2.1

type CloudMetricsMeterProviderParams struct {
	ApplicationName    string
	ApplicationVersion string
	ProjectID          string
	Logger             logger
}

CloudMetricsMeterProviderParams encapsulates the necessary parameters to initialize a CloudMetricsMeterProvider.

type MeterProvider added in v0.2.1

type MeterProvider interface {
	// Meter produces a new Meter.
	// Meters that works in a Push model, exposes a flush function that flushes all pending metrics into provider.
	// Usually used during application's shutdown.
	Meter(context.Context) (metric.Meter, func(context.Context) error, error)
}

MeterProvider defines how providers of Meters should behavior.

func MustNewCloudMetricsMeterProvider added in v0.2.1

func MustNewCloudMetricsMeterProvider(params CloudMetricsMeterProviderParams) MeterProvider

MustNewCloudMetricsMeterProvider create a new instance of a CloudMetricsMeterProvider. It panics if any error is found.

func MustNewPrometheusMeterProvider added in v0.2.1

func MustNewPrometheusMeterProvider(params PrometheusMeterProviderParams) MeterProvider

MustNewPrometheusMeterProvider create a new instance of a PrometheusMeterProvider. It panics if any error is found.

func NewCloudMetricsMeterProvider added in v0.2.1

func NewCloudMetricsMeterProvider(params CloudMetricsMeterProviderParams) (MeterProvider, error)

NewCloudMetricsMeterProvider create a new instance of a CloudMetricsMeterProvider.

func NewPrometheusMeterProvider added in v0.2.1

func NewPrometheusMeterProvider(params PrometheusMeterProviderParams) (MeterProvider, error)

NewPrometheusMeterProvider create a new instance of a PrometheusMeterProvider.

type PrometheusMeterProvider added in v0.2.1

type PrometheusMeterProvider struct {
	// contains filtered or unexported fields
}

PrometheusMeterProvider creates Metric meters.

func (PrometheusMeterProvider) Meter added in v0.2.1

Meter produces a new Prometheus meter. Its flush function doesn't do anything, since it works in a Pull model.

type PrometheusMeterProviderParams added in v0.2.1

type PrometheusMeterProviderParams struct {
	ApplicationName     string
	ApplicationVersion  string
	MetricsServerPort   int
	HistogramBoundaries []float64
}

PrometheusMeterProviderParams encapsulates the necessary parameters to initialize a PrometheusMeterProvider.

Jump to

Keyboard shortcuts

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