Home

Awesome

[DEPRECATED] Datadog Agent Action

Deprecated

Deprecation notice

This project is no longer maintained.

The recommended way of using Test Visibility in GitHub Actions is Test Visibility Github Action.

If you need a Datadog Agent in your action for reasons other than Test Visibility, consider setting up a service:

services:
  dd-agent:
    image: gcr.io/datadoghq/agent:latest
    env:
      DD_API_KEY: ${{ secrets.DATADOG_API_KEY }}
      DD_HOSTNAME: "none"
    ports:
      - 8126:8126

Usage

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]
jobs:
  test:
    steps:
      - uses: datadog/agent-github-action@v1.3
        with:
          api_key: ${{ secrets.DD_API_KEY }}
      - uses: actions/checkout@v2
      - run: make tests

Inputs

The action has the following options:

NameDescriptionRequiredDefault
api_keyThe API key for the Datadog site.True
container_nameThe name for the docker container that runs the agent.Truedatadog-agent
image_nameThe docker registry and image to pull. It has to be one of [datadog/agent (Docker), gcr.io/datadoghq/agent (GCR), public.ecr.aws/datadog/agent (ECR)]Truegcr.io/datadoghq/agent
datadog_siteThe Datadog site to send data to.Truedatadoghq.com
extra_envA comma separated list of environment variables to pass to the Datadog agent. (e.g. DD_APM_MAX_EPS=500)False
max_retriesThe maximum number of times the action will poll the agent to see if it is readyTrue10
initial_wait_timeThe initial wait time in seconds between polls to see if the agent is readyTrue5