Help us shape the future of Go! Take the 2026 Go Developer Survey

datadog

package
v0.49.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package datadog provides a telemetry backend that sends events to Datadog's HTTP Logs Intake API. It maps telemetry.Event to Datadog's native log format with region-aware endpoint resolution.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewBackend

func NewBackend(apiKey string, log *slog.Logger, opts ...Option) telemetry.Backend

NewBackend creates a Datadog telemetry backend. apiKey is the Datadog API key (not an application key).

Types

type Option

type Option func(*config)

Option configures the Datadog backend.

func WithEndpoint

func WithEndpoint(url string) Option

WithEndpoint overrides the ingest URL. Used by tests pointing at a local httptest server, and by deployments that proxy Datadog traffic. Takes precedence over WithRegion when both are set.

func WithRegion

func WithRegion(region Region) Option

WithRegion sets the Datadog region. Default: RegionUS1.

func WithSource

func WithSource(source string) Option

WithSource overrides the ddsource tag. Default: "gtb".

type Region

type Region string

Region identifies a Datadog data center region.

const (
	RegionUS1 Region = "us1" // default
	RegionUS3 Region = "us3"
	RegionUS5 Region = "us5"
	RegionEU1 Region = "eu1"
	RegionAP1 Region = "ap1"
	RegionAP2 Region = "ap2"
	RegionGOV Region = "gov"
)

Jump to

Keyboard shortcuts

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