datadog

package
v0.0.0-...-170def7 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2018 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// BackendName is the name of this backend.
	BackendName = "datadog"
)

Variables

This section is empty.

Functions

func NewClientFromViper

func NewClientFromViper(v *viper.Viper) (gostatsd.Backend, error)

NewClientFromViper returns a new Datadog API client.

Types

type Client

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

Client represents a Datadog client.

func NewClient

func NewClient(apiEndpoint, apiKey, userAgent, network string, metricsPerBatch, maxRequests uint, compressPayload, enableHttp2 bool, clientTimeout, maxRequestElapsedTime, flushInterval time.Duration, disabled gostatsd.TimerSubtypes) (*Client, error)

NewClient returns a new Datadog API client.

func (*Client) Name

func (d *Client) Name() string

Name returns the name of the backend.

func (*Client) RunMetrics

func (d *Client) RunMetrics(ctx context.Context, statser stats.Statser)

func (*Client) SendEvent

func (d *Client) SendEvent(ctx context.Context, e *gostatsd.Event) error

SendEvent sends an event to Datadog.

func (*Client) SendMetricsAsync

func (d *Client) SendMetricsAsync(ctx context.Context, metrics *gostatsd.MetricMap, cb gostatsd.SendCallback)

SendMetricsAsync flushes the metrics to Datadog, preparing payload synchronously but doing the send asynchronously.

Jump to

Keyboard shortcuts

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