metrics

package
v1.2.2 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 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 Metrics

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

func New

func New(lc fx.Lifecycle, log *zap.SugaredLogger, settings Settings) *Metrics

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

type Settings

type Settings struct {
	ApplicationName string
	Path            string
	Port            string
	Environment     string
	Version         string
}

Jump to

Keyboard shortcuts

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