datadog

package
v0.0.0-...-71bb944 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2019 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetProxyTransportFunc

func GetProxyTransportFunc(proxy *Proxy, logger *gosteno.Logger) func(*http.Request) (*url.URL, error)

GetProxyTransportFunc manages the proxy configuration

Types

type Client

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

func New

func New(
	apiURL string,
	apiKey string,
	prefix string,
	deployment string,
	ip string,
	writeTimeout time.Duration,
	flushDuration time.Duration,
	maxPostBytes uint32,
	logger *gosteno.Logger,
	customTags []string,
	proxy *Proxy,
) *Client

func NewClients

func NewClients(config *config.Config, log *gosteno.Logger) ([]*Client, error)

func (*Client) MakeInternalMetric

func (c *Client) MakeInternalMetric(name string, value uint64, timestamp int64) (metric.MetricKey, metric.MetricValue)

MakeInternalMetric creates a metric with the provided name, value and timestamp

func (*Client) PostMetrics

func (c *Client) PostMetrics(metrics metric.MetricsMap) error

PostMetrics forwards the metrics to datadog

type Formatter

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

func (Formatter) Format

func (f Formatter) Format(prefix string, maxPostBytes uint32, data map[metric.MetricKey]metric.MetricValue) [][]byte

type Payload

type Payload struct {
	Series []metric.Series `json:"series"`
}

type Proxy

type Proxy struct {
	HTTP    string
	HTTPS   string
	NoProxy []string
}

Jump to

Keyboard shortcuts

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