Support for Fargate

Datadog Support for Fargate

Bringing Fargate Metrics into Datadog requires a special agent that can be added to any Fargate container.

Datadog has written a nice guide for installing the agent manually (opens in a new tab).

This manual integration will not work with Flightcontrol services, unfortunately. With Flightcontrol, the Task Definition gets overridden with each new deployment.

What we need to do is to automatically add the Datadog agent to the Task Definition during the service deployment.

We have added an experimental feature to enable Datadog logging for your Fargate service. This is currently supported through our flightcontrol.json configuration only, we will be adding this feature to our Dashboard in the near future.

  1. In your flightcontrol.json file, please add the new experimental datadog object.
  2. Also add the relative Docker Labels, so Datadog can correctly tag the logs and metrics.

Here is a complete example:

  "id": "web",
  "name": "web",
  "type": "fargate",
  "cpu": 0.5,
  "memory": 1,
  "minInstances": 1,
  "maxInstances": 1,
  "dockerLabels": {
    "": "[{\"host\": \"%%host%%\", \"port\": 3000}]", //change the port if needed
    "": "[\"DISPLAY_NAME\"]", // name that will show in datadog
    "": "[{}]"
  "experimental": {
    // make sure the datadog object is added under experimental
    "datadog": {
      "enabled": true,
      "datadogSite": "", //plaintext
      "datadogApiKey": "<REFRENCE_TO_DD_API_KEY_IN_AWS_PARAMETER_STORE>" //from parameter store, needs to be manually added
      "envVariables": {
        // Environment variables to pass to the datadog agent
        // Similar to regular services variables
        "DD_APM_ENABLED": true,

Note: The DataDog agent requires 256MB of memory to run, make sure you configure your instance with enough memory for both your application and the DataDog agent. It is recommended to use the DataDog agent with an instance size of minimum 1GB of memory.