Skip to content

GitHub Action

Datadog Agent

v1.3.1 Latest version
Use latest version

Datadog Agent

Starts a Datadog Agent and gracefully shuts it down before the job finishes


Copy and paste the following snippet into your .yml file.

- name: Datadog Agent
  uses: DataDog/agent-github-action@v1.3.1
Learn more about this action in DataDog/agent-github-action
Choose a version

Datadog Agent Action

Starts a Datadog Agent and gracefully shuts it down before the job finishes.

The Datadog Agent will be available at localhost:8125/udp for metrics collection and localhost:8126/tcp for APM traces collection.


name: Test Code
on: [push]
      - uses: datadog/agent-github-action@v1.3
            api_key: ${{ secrets.DD_API_KEY }}
      - uses: actions/checkout@v2
      - run: make tests


The action has the following options:

Name Description Required Default
api_key The API key for the Datadog site. True
container_name The name for the docker container that runs the agent. True datadog-agent
image_name The docker registry and image to pull. It has to be one of [datadog/agent (Docker), (GCR), (ECR)] True
datadog_site The Datadog site to send data to. True
extra_env A comma separated list of environment variables to pass to the Datadog agent. (e.g. DD_APM_MAX_EPS=500) False
max_retries The maximum number of times the action will poll the agent to see if it is ready True 10
initial_wait_time The initial wait time in seconds between polls to see if the agent is ready True 5