datadog

package
v0.1.1-0...-828e7a2 Latest Latest
Warning

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

Go to latest
Published: May 12, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const ContentEncoding = "deflate"

ContentEncoding represents the value in which http request was received

View Source
const ContentEncodingHeader = "Content-Encoding"

ContentEncodingHeader represents the header value in which http request was received

View Source
const HostOverride = "dogstatsd-sift"

HostOverride is the default value for Host in a Mt

View Source
const OriginAPIEndpoint = "/api/v1/series"

OriginAPIEndpoint is the datadog endpoint to proxy request back to

Variables

This section is empty.

Functions

func HandleRequest

func HandleRequest(r *http.Request, log *logrus.Entry, cfg *configuration.Base)

HandleRequest works on an http request to decode (from deflate), parse, modify and then encode back request in the way it was received, with the modified values, so it can be proxied back to the origin.

Types

type DataPoint

type DataPoint [2]float64

DataPoint is a tuple of [UNIX timestamp, value]. Values can be int too, hence float.

type Metric

type Metric struct {
	Metric         string      `json:"metric,omitempty"`
	Points         []DataPoint `json:"points,omitempty"`
	Type           string      `json:"type,omitempty"`
	Host           string      `json:"host,omitempty"`
	Tags           []string    `json:"tags,omitempty"`
	Unit           string      `json:"unit,omitempty"`
	SourceTypeName string      `json:"source_type_name,omitempty"`
	Interval       int         `json:"interval,omitempty"`
}

Metric represents a collection of data points that we send/receive on /api/v1/series collection endpoint

type RequestSeriesPayload

type RequestSeriesPayload struct {
	Series []Metric `json:"series,omitempty"`
}

RequestSeriesPayload collection from /api/v1/series

Jump to

Keyboard shortcuts

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