Documentation ¶
Index ¶
- func DefaultMetrics(exporterType string, hostname string, timestamp uint64, ...) []datadog.Metric
- func NewCount(name string, ts uint64, value float64, tags []string) datadog.Metric
- func NewGauge(name string, ts uint64, value float64, tags []string) datadog.Metric
- func NewMetric(name string, dt MetricDataType, ts uint64, value float64, tags []string) datadog.Metric
- func ProcessMetrics(ms []datadog.Metric)
- type Consumer
- func (c *Consumer) All(timestamp uint64, buildInfo component.BuildInfo) ([]datadog.Metric, sketches.SketchSeriesList)
- func (c *Consumer) ConsumeHost(host string)
- func (c *Consumer) ConsumeSketch(_ context.Context, dims *translator.Dimensions, timestamp uint64, ...)
- func (c *Consumer) ConsumeTag(tag string)
- func (c *Consumer) ConsumeTimeSeries(_ context.Context, dims *translator.Dimensions, typ translator.MetricDataType, ...)
- type MetricDataType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultMetrics ¶
func DefaultMetrics(exporterType string, hostname string, timestamp uint64, buildInfo component.BuildInfo) []datadog.Metric
DefaultMetrics creates built-in metrics to report that an exporter is running
func NewCount ¶
NewCount creates a new Datadog count metric given a name, a Unix nanoseconds timestamp a value and a slice of tags
func NewGauge ¶
NewGauge creates a new Datadog Gauge metric given a name, a Unix nanoseconds timestamp a value and a slice of tags
func NewMetric ¶ added in v0.32.0
func NewMetric(name string, dt MetricDataType, ts uint64, value float64, tags []string) datadog.Metric
NewMetric creates a new Datadog metric given a name, a type, a Unix nanoseconds timestamp a value and a slice of tags
func ProcessMetrics ¶
func ProcessMetrics(ms []datadog.Metric)
ProcessMetrics adds the hostname to the metric and prefixes it with the "otel" namespace as the Datadog backend expects
Types ¶
type Consumer ¶ added in v0.38.0
type Consumer struct {
// contains filtered or unexported fields
}
Consumer is the metrics Consumer.
func NewConsumer ¶ added in v0.38.0
func NewConsumer() *Consumer
NewConsumer creates a new zorkian consumer.
func (*Consumer) All ¶ added in v0.38.0
func (c *Consumer) All(timestamp uint64, buildInfo component.BuildInfo) ([]datadog.Metric, sketches.SketchSeriesList)
All gets all metrics (consumed metrics and running metrics).
func (*Consumer) ConsumeHost ¶ added in v0.38.0
ConsumeHost implements the translator.HostConsumer interface.
func (*Consumer) ConsumeSketch ¶ added in v0.38.0
func (c *Consumer) ConsumeSketch( _ context.Context, dims *translator.Dimensions, timestamp uint64, sketch *quantile.Sketch, )
ConsumeSketch implements the translator.Consumer interface.
func (*Consumer) ConsumeTag ¶ added in v0.42.0
ConsumeTag implements the translator.TagsConsumer interface.
func (*Consumer) ConsumeTimeSeries ¶ added in v0.38.0
func (c *Consumer) ConsumeTimeSeries( _ context.Context, dims *translator.Dimensions, typ translator.MetricDataType, timestamp uint64, value float64, )
ConsumeTimeSeries implements the translator.Consumer interface.
type MetricDataType ¶ added in v0.32.0
type MetricDataType string
const ( // Gauge is the Datadog Gauge metric type Gauge MetricDataType = "gauge" // Count is the Datadog Count metric type Count MetricDataType = "count" )