opencensus-go-exporter-datadog: github.com/DataDog/opencensus-go-exporter-datadog Index | Files

package datadog

import "github.com/DataDog/opencensus-go-exporter-datadog"

Package datadog contains a Datadog exporter for OpenCensus.

Index

Package Files

datadog.go doc.go errors.go msgpack.go msgpack_gen.go sampler.go span.go stats.go trace.go transport.go

Constants

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

    // DefaultStatsAddrUDS specifies the default socket address for the
    // DogStatsD service over UDS. Only useful for platforms supporting unix
    // sockets.
    DefaultStatsAddrUDS = "unix:///var/run/datadog/dsd.socket"
)

type Exporter Uses

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

Exporter exports stats to Datadog.

func NewExporter Uses

func NewExporter(o Options) (exporter *Exporter, err error)

NewExporter returns an exporter that exports stats and traces to Datadog. When using trace, it is important to call Stop at the end of your program for a clean exit and to flush any remaining tracing data to the Datadog agent. If an error occurs initializing the stats exporter, the error will be returned and the exporter will be nil.

func (*Exporter) ExportSpan Uses

func (e *Exporter) ExportSpan(s *trace.SpanData)

ExportSpan implements trace.Exporter.

func (*Exporter) ExportView Uses

func (e *Exporter) ExportView(vd *view.Data)

ExportView implements view.Exporter.

func (*Exporter) Stop Uses

func (e *Exporter) Stop()

Stop cleanly stops the exporter, flushing any remaining spans to the transport and reporting any errors. Make sure to always call Stop at the end of your program in order to not lose any tracing data. Only call Stop once per exporter. Repeated calls will cause panic.

type Options Uses

type Options struct {
    // Namespace specifies the namespaces to which metric keys are appended.
    Namespace string

    // Service specifies the service name used for tracing.
    Service string

    // TraceAddr specifies the host[:port] address of the Datadog Trace Agent.
    // It defaults to localhost:8126.
    TraceAddr string

    // StatsAddr specifies the host[:port] address for DogStatsD. It defaults
    // to localhost:8125.
    StatsAddr string

    // OnError specifies a function that will be called if an error occurs during
    // processing stats or metrics.
    OnError func(err error)

    // Tags specifies a set of global tags to attach to each metric.
    Tags []string

    // GlobalTags holds a set of tags that will automatically be applied to all
    // exported spans.
    GlobalTags map[string]interface{}
}

Options contains options for configuring the exporter.

Package datadog imports 22 packages (graph) and is imported by 5 packages. Updated 2019-09-12. Refresh now. Tools for package owners.