metrics

package
v1.25.0-RC1 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GinHTTPMiddleware

func GinHTTPMiddleware(metrics *Metrics) gin.HandlerFunc

Types

type Configuration added in v1.7.1

type Configuration struct {
	Path string
	Port string
}

type Metrics

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

func New

New creates a metrics service that by defaults serves metrics on :3001/metrics, but is separate from the management endpoints Deprecated: this will be deleted once all apps are on the server module, where metrics will be served on the management port (defaults to the server port unless you change it)

func NewSvc added in v1.19.1

NewSvc creates an instance of the metrics service but does not start a server for metrics scraping. Serving the open metrics endpoint is handled by a management endpoint, see the management package.

func (*Metrics) Counter

func (s *Metrics) Counter(name string) tally.Counter

func (*Metrics) CounterWithTags

func (s *Metrics) CounterWithTags(name string, tags map[string]string) tally.Counter

func (*Metrics) Gauge

func (s *Metrics) Gauge(name string) tally.Gauge

func (*Metrics) GaugeWithTags

func (s *Metrics) GaugeWithTags(name string, tags map[string]string) tally.Gauge

func (*Metrics) GetRootScope

func (s *Metrics) GetRootScope() tally.Scope

GetRootScope gets the root scope with the configured base tags

func (*Metrics) Histogram

func (s *Metrics) Histogram(name string, buckets tally.Buckets) tally.Histogram

func (*Metrics) HistogramWithTags

func (s *Metrics) HistogramWithTags(name string, buckets tally.Buckets, tags map[string]string) tally.Histogram

func (*Metrics) Timer

func (s *Metrics) Timer(name string) tally.Timer

func (*Metrics) TimerWithTags

func (s *Metrics) TimerWithTags(name string, tags map[string]string) tally.Timer

Jump to

Keyboard shortcuts

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