Example of running a Datadog Agent in a docker cotainer and send custom metrics from a Go sample application using the Go statsd library.
-
You need an API Key from your account in Datadog. You can get one here.
-
Create
.env
file in the root folder with the following content:DD_API_KEY=xxxx
-
Run datadog agent as a docker container:
docker-compose up -d
-
Execute go application:
go run main.go