datadogreceiver

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

README

Datadog APM Receiver

Overview

The Datadog APM Receiver accepts traces in the Datadog Trace Agent Format.

This module is Experimental. The code was originally written in a closed PR from the opentelemetry-collector-contrib repo and then updated to the latest standards. The intent is to contribute this back into the opentelemetry-collector-contrib.

Supported Datadog APIs
  • v0.3 (msgpack and json)
  • v0.4 (msgpack and json)
  • v0.5 (msgpack custom format)

OTel Builder

To use this receiver, use the otel collector builder and reference this receiver.

Save below yaml in a file builder.yml:

dist: 
  #radical
  name: custom-collector
  output_path: "./bin"
  otelcol_version: 0.54.0
exporters:
  - import: go.opentelemetry.io/collector/exporter/otlpexporter
    gomod: go.opentelemetry.io/collector v0.54.0
  - import: go.opentelemetry.io/collector/exporter/loggingexporter
    gomod: go.opentelemetry.io/collector v0.54.0
receivers:
  - import: go.opentelemetry.io/collector/receiver/otlpreceiver
    gomod: go.opentelemetry.io/collector v0.54.0
  - gomod: "github.com/honeycombio/opentelemetry-collector-configs/datadogreceiver v0.1.0"
processors:
  - import: go.opentelemetry.io/collector/processor/batchprocessor
    gomod: go.opentelemetry.io/collector v0.54.0
replaces:

Building and running the custom collector

builder --config ./builder.yml
./bin/custom-collector --config=./path/to/config.yml

Testing locally

In the replaces section of the builder, reference this directory instead

replaces:
  # a list of "replaces" directives that will be part of the resulting go.mod
  - github.com/honeycombio/opentelemetry-collector-configs/datadogreceiver v0.1.0 => /path/to/this/directory

Configuration

Example:

receivers:
  datadog:
    endpoint: 0.0.0.0:8126
    read_timeout: 60s
endpoint (Optional)

The address and port on which this receiver listens for traces on

Default: 0.0.0.0:8126

read_timeout (Optional)

The read timeout of the HTTP Server

Default: 60s

Publishing a new version of this module

Please use semantic versioning standards when deciding on a new version number.

First, make sure that all changes are committed and pushed to the main branch. Make sure version.go is with the correct version number.

Then:

go test ./...
git tag datadogreceiver/v0.1.0 # substitute the appropriate version
git push --follow-tags

To confirm that the published module is available:

go list -m github.com/honeycombio/opentelemetry-collector-configs/datadogreceiver@v0.1.0 

Documentation

Overview

Package datadogreceiver ingests traces in the Datadog APM format and translates them OpenTelemetry for collector usage

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFactory

func NewFactory() component.ReceiverFactory

NewFactory creates a factory for DataDog receiver.

Types

type Config

type Config struct {
	config.ReceiverSettings       `mapstructure:",squash"`
	confighttp.HTTPServerSettings `mapstructure:",squash"`
	// ReadTimeout of the http server
	ReadTimeout time.Duration `mapstructure:"read_timeout"`
}

type InvalidMediaTypeError

type InvalidMediaTypeError struct {
	Type string
}

func (*InvalidMediaTypeError) Error

func (e *InvalidMediaTypeError) Error() string

Jump to

Keyboard shortcuts

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