datadogv1

package
v1.104.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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

func (*Request) Unmarshal

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

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

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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