datadog

package
v0.49.3 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2022 License: Apache-2.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Datadog

type Datadog struct {
	*datadog.APIClient
}

func NewDatadog

func NewDatadog() (*Datadog, error)

NewDatadog currently needs a service account configured or gcloud auth within same session to function

func (*Datadog) CanHandleSelector

func (dd *Datadog) CanHandleSelector(labels entities.Selector) bool

CanHandleSelector returns true only if both datadog queries are defined

func (*Datadog) ComputeObjective

func (dd *Datadog) ComputeObjective(o *entities.Objective, from time.Time, to time.Time) (*entities.Indicator, error)

func (*Datadog) ComputeSloFromQueryMetrics added in v0.42.1

func (dd *Datadog) ComputeSloFromQueryMetrics(ctx context.Context, query, agg string, from time.Time, to time.Time) (slo float64, err error)

func (*Datadog) GetSLOHistory added in v0.42.1

func (dd *Datadog) GetSLOHistory(sloId string, from time.Time, to time.Time, target float64) (datadog.SLOHistoryResponse, error)

func (*Datadog) ListDatadogSLOs added in v0.42.1

func (dd *Datadog) ListDatadogSLOs(ctx context.Context) (datadog.SLOListResponse, error)

func (*Datadog) ResourceFromSelector

func (dd *Datadog) ResourceFromSelector(labels entities.Selector) string

No resource identifier can be found, this is part of DD env vars as we are running queries to datadog api

func (*Datadog) RunQueryMetrics added in v0.42.1

func (dd *Datadog) RunQueryMetrics(ctx context.Context, query string, from time.Time, to time.Time) (Pointlist, error)

type Pointlist

type Pointlist *[][]float64

Jump to

Keyboard shortcuts

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