Categorygithub.com/flachnetz/go-datadog
modulepackage
1.3.1
Repository: https://github.com/flachnetz/go-datadog.git
Documentation: pkg.go.dev

# README

Build Status

Go Datadog

Simple Go interface to the Datadog API.

Metrics

The client can report metrics from go-metrics. Using either its DefaultRegistry, or a custom one, metrics can be periodically sent with code along the lines of the following:

import(
  "github.com/esailors/go-datadog"
  "os"
  "time"
)

host _ := os.Hostname()
dog := datadog.New(host, "dog-api-key")
go dog.DefaultReporter().Start(60 * time.Second)

And to use a custom registry, it would simply read:

host _ := os.Hostname()
dog := datadog.New(host, "dog-api-key")
reporter := getMyCustomRegistry()
go dog.Reporter(registry).Start(60 * time.Second)

# Functions

Create a new Datadog client.
No description provided by the author
No description provided by the author
NewReporter creates a new Reporter with a pre-configured statsd client.
Create an un-started MetricsReporter.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Reporter represents a metrics registry, and the statsd client the metrics will be flushed to.

# Type aliases

ReporterOption is function-option used during the construction of a *Reporter.