Documentation

Index

Examples

Constants

View Source
const (
	// DefaultStatsAddrUDP specifies the default protocol (UDP) and address
	// for the DogStatsD service.
	DefaultStatsAddrUDP = "localhost:8125"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Exporter

type Exporter struct {
	// contains filtered or unexported fields
}

    Exporter forwards metrics to a DataDog agent

    Example
    Output:
    
    myrecorder.max:100|g|#env:dev,l:1
    

    func NewExporter

    func NewExporter(opts Options) (*Exporter, error)

      NewExporter exports to a datadog client

      func (*Exporter) Close

      func (e *Exporter) Close() error

        Close cloess the underlying datadog client which flushes any pending buffers

        func (*Exporter) Export

        func (e *Exporter) Export(ctx context.Context, cs export.CheckpointSet) error

        func (*Exporter) ExportKindFor

          ExportKindFor returns export.DeltaExporter for statsd-derived exporters

          type Options

          type Options struct {
          	// StatsAddr specifies the host[:port] address for DogStatsD. It defaults
          	// to DefaultStatsAddrUDP.
          	StatsAddr string
          
          	// Tags specifies a set of global tags to attach to each metric.
          	Tags []string
          
          	// UseDistribution uses a DataDog Distribution type instead of Histogram
          	UseDistribution bool
          
          	// MetricNameFormatter lets you customize the metric name that gets sent to
          	// datadog before exporting
          	MetricNameFormatter func(namespace, name string) string
          
          	// StatsD specific Options
          	StatsDOptions []statsd.Option
          }

            Options contains options for configuring the exporter.

            Source Files