metrics

package
v0.0.0-...-c7c150d Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func GetDefaultClient

func GetDefaultClient() *Client

func NewClient

func NewClient(options ...Option) (*Client, error)

func (*Client) NewCounterVec

func (c *Client) NewCounterVec(ns TypeNamespace, ss TypeSubsystem, name TypeMetricName, labelNames ...string) *CounterVec

func (*Client) NewGaugeVec

func (c *Client) NewGaugeVec(ns TypeNamespace, ss TypeSubsystem, name TypeMetricName, labelNames ...string) *GaugeVec

func (*Client) NewTimeDurationHistogramVec

func (c *Client) NewTimeDurationHistogramVec(ns TypeNamespace, ss TypeSubsystem, name TypeMetricName, labelNames ...string) *TimeDurationHistogramVec

func (*Client) NewValueHistogramVec

func (c *Client) NewValueHistogramVec(ns TypeNamespace, ss TypeSubsystem, name TypeMetricName, labelNames ...string) *ValueHistogramVec

func (*Client) Shutdown

func (c *Client) Shutdown(ctx context.Context) error

type Counter

type Counter interface {
	Inc(ctx context.Context, labels ...string)
}

type CounterVec

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

func NewCounterVec

func NewCounterVec(ns TypeNamespace, ss TypeSubsystem, name TypeMetricName, labelNames ...string) *CounterVec

func (*CounterVec) Inc

func (c *CounterVec) Inc(ctx context.Context, labelValues ...string)

Inc increments labels.

type Gauge

type Gauge interface {
	Set(ctx context.Context, v float64, labels ...string)
}

type GaugeVec

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

func NewGaugeVec

func NewGaugeVec(ns TypeNamespace, ss TypeSubsystem, name TypeMetricName, labelNames ...string) *GaugeVec

func (*GaugeVec) Set

func (g *GaugeVec) Set(ctx context.Context, v float64, labelValues ...string)

Set sets v to labels.

type Histogram

type Histogram interface {
	Observe(ctx context.Context, v time.Duration, labels ...string)
}

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option applies a configuration option value to a MeterProvider.

func WithMeterName

func WithMeterName(meterName string) Option

type TimeDurationHistogramVec

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

func NewTimeDurationHistogramVec

func NewTimeDurationHistogramVec(ns TypeNamespace, ss TypeSubsystem, name TypeMetricName, labelNames ...string) *TimeDurationHistogramVec

func (*TimeDurationHistogramVec) Observe

func (t *TimeDurationHistogramVec) Observe(ctx context.Context, v time.Duration, labelValues ...string)

type TypeMetricName

type TypeMetricName string

func NewTypeMetricName

func NewTypeMetricName(n string) TypeMetricName

func (TypeMetricName) String

func (t TypeMetricName) String() string

type TypeNamespace

type TypeNamespace string

func NewTypeNamespace

func NewTypeNamespace(ns string) TypeNamespace

func (TypeNamespace) String

func (t TypeNamespace) String() string

type TypeSubsystem

type TypeSubsystem string

func NewTypeSubsystem

func NewTypeSubsystem(ss string) TypeSubsystem

func (TypeSubsystem) String

func (t TypeSubsystem) String() string

type ValueHistogram

type ValueHistogram interface {
	Observe(ctx context.Context, v int64, labels ...string)
}

type ValueHistogramVec

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

func NewValueHistogramVec

func NewValueHistogramVec(ns TypeNamespace, ss TypeSubsystem, name TypeMetricName, labelNames ...string) *ValueHistogramVec

func (*ValueHistogramVec) Observe

func (t *ValueHistogramVec) Observe(ctx context.Context, v int64, labelValues ...string)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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