Metrics sidecar

Datadog Metrics Integration

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

Datadog's manual integration will not work because Flightcontrol overrides the Task Definition gets overridden with each new deployment.

What we need to do is add a Datadog agent as a sidecar to the service. For more info on sidecars, see the related documentation.

  1. In your flightcontrol.json file, you will need to add a sidecars property with the Datadog agent image.
  2. You may also add Docker Labels, so Datadog can correctly tag the logs and metrics.

Here is a complete example:

  "id": "web",
  "name": "web",
  "type": "web",
  "target": {"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
    "": "[{}]",
    "com.datadoghq.tags.env": "production"
  "sidecars": [
      "name": "datadog-agent",
      "image": "",
      "cpuAllotment": 0.5,
      "memoryAllotment": 0.5,
      "logging": false,
      "envVariables": {
        "DD_API_KEY": {
          "fromParameterStore": ""
        "DD_ENV": "production",
        "ECS_FARGATE": true,
        "DD_SITE": "",
        "DD_APM_ENABLED": true,
      "ports": [4317, 4318]

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.