datadogsketches

package
v1.100.1-cluster Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Dogsketch

type Dogsketch struct {
	Ts  int64
	Cnt int64
	Min float64
	Max float64
	Sum float64
	K   []int32
	N   []uint32
}

Dogsketch proto struct

message Dogsketch {
  int64 ts = 1;
  int64 cnt = 2;
  double min = 3;
  double max = 4;
  double sum = 6;
  repeated sint32 k = 7;
  repeated uint32 n = 8;
}

See https://github.com/DataDog/agent-payload/blob/38db68d9641c8a0bd2e1eac53b9d54793448850f/proto/metrics/agent_payload.proto#L104

type Label

type Label struct {
	Name  string
	Value string
}

Label is a single label for Metric

type Metric

type Metric struct {
	Name   string
	Labels []Label
	Points []Point
}

Metric stores metrics extracted from sketches

type Point

type Point struct {
	Value     float64
	Timestamp int64
}

Point stores a single point extracted from sketches

type Sketch

type Sketch struct {
	Metric      string
	Host        string
	Tags        []string
	Dogsketches []*Dogsketch
}

Sketch proto struct

message Sketch {
  string metric = 1;
  string host = 2;
  repeated string tags = 4;
  repeated Dogsketch dogsketches = 7
}

See https://github.com/DataDog/agent-payload/blob/38db68d9641c8a0bd2e1eac53b9d54793448850f/proto/metrics/agent_payload.proto#L91

func (*Sketch) RowsCount

func (s *Sketch) RowsCount() int

RowsCount returns the number of samples s generates.

func (*Sketch) ToSummary

func (s *Sketch) ToSummary() []*Metric

ToSummary generates Prometheus summary from the given s.

type SketchPayload

type SketchPayload struct {
	Sketches []*Sketch
}

SketchPayload stores sketches extracted from /api/beta/sketches endpoint

message SketchPayload {
	 repeated Sketch sketches = 1
}

See https://github.com/DataDog/agent-payload/blob/38db68d9641c8a0bd2e1eac53b9d54793448850f/proto/metrics/agent_payload.proto#L90

func (*SketchPayload) UnmarshalProtobuf

func (sp *SketchPayload) UnmarshalProtobuf(src []byte) (err error)

UnmarshalProtobuf decodes src to SketchPayload struct

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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