datadogexporter

package module
v0.19.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2021 License: Apache-2.0 Imports: 34 Imported by: 10

README

Datadog Exporter

This exporter sends metric and trace data to Datadog.

Configuration

The only required setting is a Datadog API key.

datadog:
 api:
   key: "<API key>"

To send data to the Datadog EU site, set the api.site parameter to datadoghq.eu:

datadog:
 api:
   key: "<API key>"
   site: datadoghq.eu

The hostname, environment, service and version can be set in the configuration for unified service tagging. The exporter will try to retrieve a hostname following the OpenTelemetry semantic conventions if there is one available.

See the sample configuration file under the example folder for other available options.

Trace exporter

Important Pipeline Setup Details

This exporter assumes a pipeline using the datadog exporter also includes a batch processor configured with the following:

  • a timeout setting of 10s(10 seconds).

Please make sure to include this processor in your pipeline. An example pipeline can be found below.

A batch representing 10 seconds of traces is a constraint of Datadog's API Intake for Trace Related Statistics. Without this setting, trace related metrics including .hits .errors and .duration for different services and service resources may be inaccurate over periods of time.

Example:

receivers:
 examplereceiver:

processors:
 batch:
   timeout: 10s

exporters:
 datadog/api:
   hostname: customhostname
   env: prod
   service: myservice
   version: myversion

   tags:
     - example:tag

   api:
     key: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
     site: datadoghq.eu

service:
 pipelines:
   traces:
     receivers: [examplereceiver]
     processors: [batch]
     exporters: [datadog/api]

Metric exporter

The metrics exporter does not assume any specific pipeline setup. There are a number of optional settings for configuring how to send your metrics:

Option name Description Default
send_monotonic_counters Cumulative monotonic metrics are sent as deltas between successive measurements. Disable this flag to send get the raw, monotonically increasing value. true
delta_ttl Maximum number of seconds values from cumulative monotonic metrics are kept in memory. 3600

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() component.ExporterFactory

NewFactory creates a Datadog exporter factory

Types

type Payload added in v0.14.0

type Payload struct {
	CreationDate time.Time
	Bytes        []byte
	Headers      map[string]string
}

Payload represents a data payload to be sent to some endpoint

type TraceEdgeConnection added in v0.14.0

type TraceEdgeConnection interface {
	SendTraces(ctx context.Context, trace *pb.TracePayload, maxRetries int) error
	SendStats(ctx context.Context, stats *stats.Payload, maxRetries int) error
}

TraceEdgeConnection is used to send data to trace edge

Directories

Path Synopsis
ec2

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL