observability

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPrometheusMetricsProvider

func NewPrometheusMetricsProvider(ex *prometheus.Exporter, opts ...metric.Option) *metric.MeterProvider

Types

type Class

type Class int
const (
	Counter Class = iota
	UpDownCounter
	Histogram
)

type Metrics

type Metrics interface {
	Counter(ctx context.Context, met string, value float64, opt ...metric.AddOption) error
	UpDownCounter(ctx context.Context, met string, value float64, opt ...metric.AddOption) error
	Histogram(ctx context.Context, met string, value float64, opt ...metric.RecordOption) error
}

func NewMetrics

func NewMetrics(opts ...MetricsOpts) Metrics

type MetricsOpts

type MetricsOpts func(*metrics)

func WithNamespace

func WithNamespace(namespace string) MetricsOpts

Jump to

Keyboard shortcuts

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