Migrating from the Datadog Forwarder to the Datadog Lambda Extension

Migrating from the Datadog Forwarder to the Datadog Lambda Extension

Overview

This guide explains how to migrate from the Datadog Forwarder to the Datadog Lambda Extension.

The Datadog Lambda Extension is a lightweight version of the Datadog Agent built to run alongside your code with minimal performance overhead.

Datadog recommends that you set up the Extension before removing the Forwarder. This means that for the period during which both the Extension and Forwarder are active, all telemetry is sent twice. The alternative (removing the Forwarder before setting up the Extension) results in a period of zero visibility. Depending on your organization’s particular needs, you may prefer one outcome over the other.

Setting up the Datadog Lambda Extension

See the Datadog Lambda Extension documentation.

Removing the Datadog Forwarder

Prevent the Forwarder from attaching to new functions

When you deploy a new function, the Datadog Forwarder detects an unsubscribed function and automatically creates a new subscription. If you used the automatic configuration for the Forwarder, it will not automatically resubscribe to your function’s log groups if the Extension is installed on that function.

Remove the resource name of the Forwarder from your serverless.yml file.

Remove the resource name of the Forwarder from your template.yml file.

Remove the resource name of the Forwarder from your CDK stack.

Manually remove the subscription from the AWS console.

Manually remove the subscription from the AWS console.

Manually remove the subscription from the AWS console.

Manually remove the subscription from the AWS console.

Manually remove the subscription from the AWS console.

For more information, see the Datadog Forwarder documentation.

Hybrid approach

You may also wish to keep using the Datadog Forwarder for existing functions while using the Datadog Lambda Extension for all new functions.

  1. Ensure that the Forwarder does not attach automatically to new functions.
  2. For each new function you deploy, set up the Extension