LaunchDarkly Developer Documentation

Get started in under 30 minutes.
LaunchDarkly provides feature flags as a service for Java · Python · Ruby · Go · Node.js · PHP · .NET. Control feature launches -- who sees what and when -- without multiple code deploys. Easy dashboard for phased rollouts, targeting and segmenting.
Need more help? write us at support@launchdarkly.com

Get Started    Documentation

Overview

This topic explains how to configure and use the LaunchDarkly Datadog integration.

The Datadog integration lets you set up Datadog Events to receive any activity from LaunchDarkly. When something changes, such as a feature flag updates or a new team member is added to LaunchDarkly, LaunchDarkly sends an event to Datadog. Use this integration to correlate and understand how changes to your features in LaunchDarkly impact your app and infrastructure metrics.

Prerequisites

To connect Datadog to LaunchDarkly, you need an API key from Datadog.

To generate an API key:

  1. Log into Datadog and navigate to the APIs tab in the "Integrations" section.
The Datadog UI with the APIs tab selected.

The Datadog UI with the APIs tab selected.

  1. Click New API key in the "API keys" section. A new API key appears in the UI.
The Datadog UI with the "Create API key" button called out.

The Datadog UI with the "Create API key" button called out.

  1. Hover over the bar in the "Key" column to see the API key. Copy the key and save it somewhere secure. You need it to set up the Datadog integration in LaunchDarkly.

Setting up the Datadog integration

After you create an API key in Datadog, you can set up the integration in LaunchDarkly.

To set up the Datadog integration:

  1. Navigate to the Integrations page and click Datadog.
  2. Click Add Integration. The "Create a Datadog configuration" screen appears.
  3. (Optional) Give your integration a human-readable Name.
  4. Paste the Datadog API key into the API key field. You created this key in the Prerequisites section.
  5. (Optional) Add a policy statement or set a policy with the Advanced editor. To learn more, read Filtering the events you send to Datadog
The Create a Datadog configuration screen.

The Create a Datadog configuration screen.

  1. Click Save Datadog Configuration. The new integration appears in the "Your APM integrations" section of the Integrations page. It is switched on by default.
A Datadog integration in the Your APM integrations section.

A Datadog integration in the Your APM integrations section.

After you set up the Datadog integration, events from LaunchDarkly appear in your Datadog dashboard.

Events may not appear immediately

It may take time for changes made in LaunchDarkly to propagate and appear in the Datadog events dashboard depending on Datadog's polling intervals.

Filtering the events you send to Datadog

By default, LaunchDarkly sends events to Datadog for changes made to any project, environment, feature flag, and more. If you have a more limited use case for using the integration, or you wish to restrict which data you send to Datadog, you can filter which events LaunchDarkly sends.

To filter events, write a policy using the same syntax as our custom roles feature to filter the events sent to Datadog.

For more information about writing policies, read Policies in custom roles.

For example, if you only want to receive an event when a change is made to one of the feature flags in your testing environment, you can add the following policy to your events stream:

[
  {
    "effect": "allow",
    "resources": [
      "proj/*:env/your-test-environment:flag/*"
    ],
    "actions": [
      "*"
    ]
	}
]

To add a custom filter:

  1. Navigate to the Integrations page and scroll to the "Your APM integrations" section.
  2. Find the integration you wish to modify and click Edit. The "Create a Datadog configuration" screen appears.
The Your APM integrations section with the **Edit** button called out.

The Your APM integrations section with the Edit button called out.

  1. Click Advanced editor. The Advanced editor opens.
  2. Enter your custom policy.
The Create a Datadog configuration screen with the Advanced editor open and a policy inside it.

The Create a Datadog configuration screen with the Advanced editor open and a policy inside it.

  1. Click Save Datadog Configuration.
  2. Verify that LaunchDarkly is sending a customized set of events by viewing the events in your Datadog dashboard.

Disabling the Datadog integration

If you wish to disable the Datadog integration, there are two methods to do so:

  • Disable the integration to pause the flow of events to Datadog, but leaves the connection between Datadog and LaunchDarkly intact.
  • Delete the integration to cease all event export and break the connection between Datadog and LaunchDarkly.

To temporarily disable the Datadog integration:

  1. Navigate to the Integrations page and scroll to the "Your APM integrations" section.
  2. Find the Datadog integration you wish to disable.
A Datadog integration in the Your APM integrations section.

A Datadog integration in the Your APM integrations section.

  1. Click the toggle to turn the integration off.
The integration toggle set to **Off**.

The integration toggle set to Off.

To permanently delete the Datadog integration:

  1. Navigate to the Integrations page and scroll to the "Your APM integrations" section.
  2. Find the integration you wish to modify and click Edit. The "Create a Datadog configuration" screen appears.
  3. Click Delete in the "Delete Datadog configuration" section. A confirmation screen appears.
  4. Click Delete to confirm.
The Delete Datadog configuration section.

The Delete Datadog configuration section.


Datadog


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.