chqdatadogexporter

package module
v0.0.0-...-15a0606 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2025 License: Apache-2.0 Imports: 31 Imported by: 0

README

Datadog exporter

This exporter sends telemetry data to a Datadog endpoint. It is a modified version and in many cases a complete rewrite to make it consume less resources and increase stability.

It is intended to be used as the final stage of a "sink" definition. It can be used outside of the Cardinal Ecosystem, but it requires additional configuration to use properly. When possible, use the standard Datadog exporter that is part of the contrib release of the open telemetry receiver.

Configuration

exporters:
  chqdatadog/d460947f-e9d1-45f0-ac4f-130fbdf3bd2c:
    api_key: "10d6c875bf744401af0b33adc641f8a5"
    logs:
      compression: "gzip"
      endpoint: "https://datadog.intake.us-east-2.aws.cardinalhq.io"
    metrics:
      compression: "gzip"
      endpoint: "https://datadog.intake.us-east-2.aws.cardinalhq.io"
    sending_queue:
      queue_size: 20000
      storage: "file_storage/scratch"
    traces:
      compression: "gzip"
      endpoint: "https://datadog.intake.us-east-2.aws.cardinalhq.io"

Each endpoint is individually configured, allowing metrics or logs or traces to be independently routed. For an actual datadog endpoint, these are often different for each telemetry type.

The sending_queue setting is optional but highly recommended as Datadog ingest can take significant time periodically, and this prevents data loss. A file-based storage scheme used inside the cardinal pipelines to reduce memory usage.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() exporter.Factory

Types

type Config

type Config struct {
	exporterhelper.TimeoutConfig `mapstructure:",squash"`
	QueueConfig                  configoptional.Optional[exporterhelper.QueueBatchConfig] `mapstructure:"sending_queue"`
	RetryConfig                  configretry.BackOffConfig                                `mapstructure:"retry_on_failure"`
	APIKey                       configopaque.String                                      `mapstructure:"api_key"`
	Metrics                      MetricsConfig                                            `mapstructure:"metrics"`
	Logs                         LogsConfig                                               `mapstructure:"logs"`
	Traces                       TracesConfig                                             `mapstructure:"traces"`
}

func (*Config) Validate

func (c *Config) Validate() error

type DDLog

type DDLog struct {
	DDSource string `json:"ddsource,omitempty"`
	DDTags   string `json:"ddtags,omitempty"`
	Message  string `json:"message,omitempty"`
	Hostname string `json:"hostname,omitempty"`
	Service  string `json:"service,omitempty"`
}

type LogsConfig

type LogsConfig struct {
	confighttp.ClientConfig `mapstructure:",squash"`
	APIKey                  configopaque.String `mapstructure:"api_key"`
}

type MetricsConfig

type MetricsConfig struct {
	confighttp.ClientConfig `mapstructure:",squash"`
	APIKey                  configopaque.String `mapstructure:"api_key"`
}

type TracesConfig

type TracesConfig struct {
	confighttp.ClientConfig `mapstructure:",squash"`
	APIKey                  configopaque.String `mapstructure:"api_key"`
}

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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