metrics

package
v3.19.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2020 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

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

func NewCollector

func NewCollector(l logger.Logger, c CollectorConfig) *Collector

func (*Collector) Scope

func (c *Collector) Scope(tags Tags) *Scope

func (*Collector) Start

func (c *Collector) Start() error

func (*Collector) Stop

func (c *Collector) Stop() error

type CollectorConfig

type CollectorConfig struct {
	Datadog     bool
	DatadogHost string
}

type Scope

type Scope struct {
	Tags Tags
	// contains filtered or unexported fields
}

func (*Scope) Count

func (s *Scope) Count(name string, value int64, tags ...Tags)

Count tracks how many times something happened per second.

func (*Scope) Timing

func (s *Scope) Timing(name string, value time.Duration, tags ...Tags)

Timing sends timing information in milliseconds.

func (*Scope) With

func (s *Scope) With(tags Tags) *Scope

With returns a scope with more tags added

type Tags

type Tags map[string]string

func (Tags) StringSlice

func (tags Tags) StringSlice() []string

Jump to

Keyboard shortcuts

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