statsd

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "statsd"

Variables

This section is empty.

Functions

func New

func New(tree config.Tree) (stats.Stats, error)

Types

type Client

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

func (*Client) Count

func (c *Client) Count(key string, n interface{}, tags ...map[string]string)

func (*Client) Dec

func (c *Client) Dec(key string, tags ...map[string]string)

func (*Client) Gauge

func (c *Client) Gauge(key string, n interface{}, tags ...map[string]string)

func (*Client) Histogram

func (c *Client) Histogram(key string, n interface{}, tags ...map[string]string)

func (*Client) Inc

func (c *Client) Inc(key string, tags ...map[string]string)

func (*Client) Log added in v1.0.0

func (c *Client) Log(l log.Logger) stats.Stats

func (*Client) Start

func (c *Client) Start()

func (*Client) Stop

func (c *Client) Stop()

func (*Client) Timing

func (c *Client) Timing(key string, t time.Duration, tags ...map[string]string)

func (*Client) With

func (c *Client) With(meta map[string]string) stats.Stats

type Config

type Config struct {
	Addr       string            `toml:"addr"`
	Port       string            `toml:"port"`
	TagsFormat string            `toml:"tags_format"`
	Tags       map[string]string `toml:"tags"`
}

type TagFormat

type TagFormat uint8

TagFormat represents the format of tags sent by a Client.

const (
	// InfluxDB tag format.
	// See https://influxdb.com/blog/2015/11/03/getting_started_with_influx_statsd.html
	InfluxDB TagFormat = iota + 1
	// Datadog tag format.
	// See http://docs.datadoghq.com/guides/metrics/#tags
	Datadog
)

Jump to

Keyboard shortcuts

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