veneur

package
v4.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2018 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GlobalOnly = "veneurglobalonly"
	LocalOnly  = "veneurlocalonly"
	SinkOnly   = "veneursinkonly"

	SignalfxSink = "signalfx"
	DatadogSink  = "datadog"
	KafkaSink    = "kafka"
)

Variables

View Source
var (
	TagSignalfxOnly = stats.Tag{Name: SinkOnly, Value: SignalfxSink}
	TagDatadogOnly  = stats.Tag{Name: SinkOnly, Value: DatadogSink}
	TagKafkaOnly    = stats.Tag{Name: SinkOnly, Value: KafkaSink}
)

Functions

This section is empty.

Types

type Client

type Client struct {
	*datadog.Client
	// contains filtered or unexported fields
}

Client represents an veneur client that implements the stats.Handler interface.

func NewClient

func NewClient(addr string) *Client

NewClient creates and returns a new veneur client publishing metrics to the server running at addr.

func NewClientGlobal

func NewClientGlobal(addr string) *Client

NewClientGlobal creates a client that sends all metrics to the Global Veneur Aggregator

func NewClientWith

func NewClientWith(config ClientConfig) *Client

NewClientWith creates and returns a new veneur client configured with the given config.

func (*Client) HandleMeasures

func (c *Client) HandleMeasures(time time.Time, measures ...stats.Measure)

HandleMetric satisfies the stats.Handler interface.

type ClientConfig

type ClientConfig struct {
	datadog.ClientConfig

	// Veneur Specific Configuration
	// If set true, all metrics will be sent with veneurglobalonly tag
	GlobalOnly bool

	// If set true, all metrics will be sent with veneurlocalonly tag
	// Cannot be set in conjunction with GlobalOnly
	LocalOnly bool

	// Adds veneursinkonly:<sink> tag to all metrics. Valid sinks can be
	// found here: https://github.com/stripe/veneur#routing-metrics
	SinksOnly []string
}

The ClientConfig type is used to configure veneur clients. It inherits the datadog config since the veneur client reuses the logic in the datadog client to emit metrics

Jump to

Keyboard shortcuts

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