Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Metric ¶
type Metric struct { Name string // contains filtered or unexported fields }
Metric defines a Datadog-based metric. It implements the SourceMetric interface.
func NewSourceMetric ¶
func NewSourceMetric(name string, config *MetricConfig, minPointAge, counterResetInterval time.Duration) (*Metric, error)
NewSourceMetric creates a new SourceMetric from a metric name and configuration parameters.
func (*Metric) StackdriverData ¶
func (m *Metric) StackdriverData(ctx context.Context, lastPoint time.Time, rec record.MetricRecord) (*metricpb.MetricDescriptor, []*monitoringpb.TimeSeries, error)
StackdriverData issues a Datadog query, returning metric descriptor and time series data. Time series data will include points after the given lastPoint timestamp.
func (*Metric) StackdriverName ¶
StackdriverName returns the full Stackdriver metric name (also called "metric type") for this metric.
type MetricConfig ¶
type MetricConfig struct { APIKey string `yaml:"api_key" validate:"nonzero"` ApplicationKey string `yaml:"application_key" validate:"nonzero"` Query string `validate:"nonzero"` Cumulative bool }
MetricConfig defines configuration file parameters for a specific metric imported from Datadog.
Click to show internal directories.
Click to hide internal directories.