datadogprocessor

package module
v0.93.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2024 License: Apache-2.0 Imports: 14 Imported by: 2

README

Datadog Processor

Status
Stability deprecated: traces
Distributions contrib
Issues Open issues Closed issues
Code Owners @mx-psi, @dineshg13
Emeritus @gbbr

Deprecated in favor of datadogconnector

The datadogprocessor has been deprecated in favor of the datadogconnector. Please refer to the following docs in order to update to the datadogconnector.

Description

This component has been deprecated in favor of its successor the Datadog Connector which serves the same purpose and should be used in place of the Datadog processor.

The Datadog Processor can be used to compute Datadog APM Stats pre-sampling. For example, when using the tailsamplingprocessor or probabilisticsamplerprocessor components, the datadogprocessor can be prepended into the pipeline to ensure that Datadog APM Stats are accurate and include the dropped traces.

Usage

To use the Datadog Processor, simply prepend it into a pipeline before any sampling processor. The Datadog Processor will compute APM Stats on all spans that it sees. Here is an example on how to add it to a pipeline using the probabilisticsampler:

Before After
# ...
processors:
  # ...
  probabilistic_sampler:
    sampling_percentage: 20

exporters:
  datadog:
    api:
      key: ${env:DD_API_KEY}

service:
  pipelines:
    metrics:
      receivers: [otlp]
      processors: [batch]
      exporters: [datadog]
    traces:
      receivers: [otlp]
      processors: [batch, probabilistic_sampler]
      exporters: [datadog]
# ...
processors:
  # ...
  probabilistic_sampler:
    sampling_percentage: 20
  # add the "datadog" processor definition
  datadog:

exporters:
  datadog:
    api:
      key: ${env:DD_API_KEY}

service:
  pipelines:
    metrics:
      receivers: [otlp]
      processors: [batch]
      exporters: [datadog]
    traces:
      receivers: [otlp]
      # prepend it to the sampler in your pipeline:
      processors: [batch, datadog, probabilistic_sampler]
      exporters: [datadog]

Simply add the Datadog Processor into your list of processors and prepend it to the sampler in the traces pipeline to ensure it sees all spans.

Configuration

By default, when used in conjunction with the Datadog Exporter, the processor should detect its presence (as long as it is configured within a pipeline), and use it to export the Datadog APM Stats. No configuration needed!

If using within a gateway deployment or running alongside the Datadog Agent where the Datadog Exporter is not present, then you must specify an alternative exporter to use, such as for example an OTLP exporter:

processors:
  datadog:
    metrics_exporter: otlp

The default value for metrics_exporter is datadog. If your Datadog Exporter has a different name, you must specify it via config. Any configured metrics exporter must exist as part of a metrics pipeline.

When using in conjunction with the Datadog Agent's OTLP Ingest, the minimum required Datadog Agent version that supports this processor is 7.42.0.

If not using the Datadog backend, the processor will still create valid RED metrics, but in that situation you may prefer to use the spanmetricsprocessor instead.

Documentation

Overview

Package datadogprocessor contains the Datadog Processor. The Datadog Processor is used in conjunction with the Collector's tail samplers (such as the tailsamplingprocessor or the probabilisticsamplerprocessor) to extract accurate APM Stats in situations when not all traces are seen by the Datadog Exporter.

By default, the processor looks for an exporter named "datadog" in a metrics pipeline. It can use any other exporter (in case the name is different, a gateway deployment is used or the collector runs alongside the Datadog Agent) but this needs to be specified via config, such as for example:

processor:
  datadog:
    metrics_exporter: otlp

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() processor.Factory

NewFactory creates a factory for the datadog processor.

Types

type Config

type Config struct {

	// MetricsExporter specifies the name of the metrics exporter to be used when
	// exporting stats metrics.
	MetricsExporter component.ID `mapstructure:"metrics_exporter"`
}

Config defines the configuration options for datadogprocessor.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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