statsd

package
v0.16.1 Latest Latest
Warning

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

Go to latest
Published: Oct 2, 2019 License: MIT Imports: 6 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 interface {
	Inc(stat string)
	Timing(stat string, d time.Duration)
}

Client is the statsd interface that we use.

var Noop Client = client{ensureStatsd(statsd.NewNoopClient())}

Noop is a no-op statsd client.

func MultiClient added in v0.15.0

func MultiClient(clients ...Client) Client

MultiClient combines multiple Clients into a single Client.

func NewClient

func NewClient(logger *zap.Logger, statsdHostPort, service, method string) (Client, error)

NewClient returns a Client that sends metrics to statsd.

func NewPrefixedClient added in v0.15.0

func NewPrefixedClient(client Client, prefix string) Client

NewPrefixedClient wraps the provided client to add a prefix to all calls.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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