datadog

package
v1.93.9 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SplitTag added in v1.79.0

func SplitTag(tag string) (string, string)

SplitTag splits DataDog tag into tag name and value.

See https://docs.datadoghq.com/getting_started/tagging/#define-tags

Types

type Point

type Point [2]float64

Point represents a point from DataDog POST request to /api/v1/series

func (*Point) Timestamp

func (pt *Point) Timestamp() int64

Timestamp returns timestamp in milliseconds from the given pt.

func (*Point) Value

func (pt *Point) Value() float64

Value returns value from the given pt.

type Request

type Request struct {
	Series []Series `json:"series"`
}

Request represents DataDog POST request to /api/v1/series

See https://docs.datadoghq.com/api/latest/metrics/#submit-metrics

func (*Request) Unmarshal

func (req *Request) Unmarshal(b []byte) error

Unmarshal unmarshals DataDog /api/v1/series request body from b to req.

See https://docs.datadoghq.com/api/latest/metrics/#submit-metrics

b shouldn't be modified when req is in use.

type Series

type Series struct {
	Metric string `json:"metric"`
	Host   string `json:"host"`

	// The device field does not appear in the datadog docs, but datadog-agent does use it.
	// Datadog agent (v7 at least), removes the tag "device" and adds it as its own field. Why? That I don't know!
	// https://github.com/DataDog/datadog-agent/blob/0ada7a97fed6727838a6f4d9c87123d2aafde735/pkg/metrics/series.go#L84-L105
	Device string `json:"device"`

	Points []Point  `json:"points"`
	Tags   []string `json:"tags"`
}

Series represents a series item from DataDog POST request to /api/v1/series

See https://docs.datadoghq.com/api/latest/metrics/#submit-metrics

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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