Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseMetricCollector ¶
type BaseMetricCollector struct {
DatadogMetrics DatadogMetricsClient
}
BaseMetricCollector ...
func NewBaseMetricCollector ¶
func NewBaseMetricCollector(dm *DatadogMetrics) *BaseMetricCollector
NewBaseMetricCollector instance
type Data ¶
type Data struct { Name Name Type Type Value float64 // MetricTags level empty if no categories required to relate metric MetricTags []Tag }
Data for metrics
type DatadogMetrics ¶
type DatadogMetrics struct { ServicePrefix string DefaultMetricsTags []string // contains filtered or unexported fields }
DatadogMetrics ready to use client to send statsd metrics
func NewDatadogMetrics ¶
func NewDatadogMetrics(cfg config.DatadogParameters, orgPrefix string) (*DatadogMetrics, error)
NewDatadogMetrics instance required to have cfg config.DatadogParameters to get information about service and optional orgPrefix to append into for metric name
func (DatadogMetrics) GetClient ¶
func (d DatadogMetrics) GetClient() statsd.ClientInterface
GetClient statsd client
func (DatadogMetrics) GetDefaultTags ¶
func (d DatadogMetrics) GetDefaultTags() []string
GetDefaultTags that will be used in Datadog metrics
func (DatadogMetrics) GetServiceNamePrefix ¶
func (d DatadogMetrics) GetServiceNamePrefix() string
GetServiceNamePrefix for metric name
type DatadogMetricsClient ¶
type DatadogMetricsClient interface { // GetClient statsd client GetClient() statsd.ClientInterface // GetDefaultTags that will be used in Datadog metrics GetDefaultTags() []string // GetServiceNamePrefix for metric name GetServiceNamePrefix() string }
DatadogMetricsClient ...
type Name ¶
type Name string
Name must be in specific format like cart.amount, request.my_request.x etc
type Type ¶
type Type byte
Type is an Enum type for metric types
const ( // MetricTypeCountEvents Datadog will aggregate events to show how many events happened in second MetricTypeCountEvents Type = iota // MetricTypeEvent send single event to Datadog MetricTypeEvent // MetricTypeMeasurement aggregates value of metrics in Datadog for measuring it, like memory or cart value MetricTypeMeasurement )
Click to show internal directories.
Click to hide internal directories.