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: 0

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