Documentation
¶
Overview ¶
Package datadog is a logging sink that sends records to Datadog's log intake (HTTP API v2):
datadog.New(datadog.Options{}) // DD_API_KEY, DD_SITE, DD_SERVICE, DD_ENV…
Records logged in a request with a trusted traceparent carry its trace as dd.trace_id and dd.span_id, in the form Datadog's APM joins on.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
// APIKey is the key logs are sent with. The default is DD_API_KEY's.
APIKey string
// Site is the Datadog site, such as datadoghq.eu. The default is
// DD_SITE's, or datadoghq.com.
Site string
// URL replaces the intake address made from Site.
URL string
// Service, Env, Version, Hostname and Tags describe where the logs
// come from. The defaults are DD_SERVICE (or the program's name),
// DD_ENV, DD_VERSION, the host's name and DD_TAGS.
Service, Env, Version, Hostname string
Tags []string
// Source is ddsource. The default is "go".
Source string
// NoGzip sends requests uncompressed.
NoGzip bool
// Client sends the requests. The default is http.DefaultClient.
Client *http.Client
}
Options configures the sink. Unset fields come from the environment variables Datadog's agents read.
Click to show internal directories.
Click to hide internal directories.