• Home
  • Integrations
  • SDKs
  • Guides
  • API docs
No results for ""
EXPAND ALL

EDIT ON GITHUB

Using the Datadog events integration

Read time: 3 minutes
Last edited: Oct 29, 2021
The Datadog events integration is a Pro and Enterprise feature

The Datadog events integration is available to customers on a Pro or Enterprise plan. To learn more, read about our pricing. To upgrade your plan, contact Sales.

Overview

This topic explains how to configure and use the LaunchDarkly Datadog events 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 account 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.

This integration supports triggers

You can use LaunchDarkly's triggers feature with Datadog to automatically perform actions on feature flags. To learn more, read Using triggers with Datadog.

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 find the Datadog card.
  2. Click Add integration. The integration configuration screen appears.
  3. (Optional) Give your integration a human-readable Name.
  4. Enter the Datadog API key into the Datadog API key field. You created this key in the Prerequisites section.
  5. (Optional) Enter a Datadog host URL.
  6. (Optional) Configure a custom policy to control which events LaunchDarkly sends to Datadog. To learn more, read Filtering the events you send to Datadog.

The Datadog integration configuration screen.
The Datadog integration configuration screen.

  1. After reading the Integration Terms and Conditions, check the I have read and agree to the Integration Terms and Conditions checkbox.

  2. Click Save configuration. The new integration appears on the Integrations page. It is switched on by default.

A Datadog integration in the integrations section.
A Datadog integration in the 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:

1[
2 {
3 "effect": "allow",
4 "resources": [
5 "proj/*:env/your-test-environment:flag/*"
6 ],
7 "actions": [
8 "*"
9 ]
10 }
11]

To add a custom filter:

  1. Navigate to the Integrations page.
  2. Find the integration you wish to modify and click Edit integration configuration. The "Edit Datadog configuration" screen appears.

The Datadog configuration screen with the Edit integration configuration option called out.
The Datadog configuration screen with the Edit integration configuration option 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 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.
  2. Find the Datadog integration you wish to disable.

A Datadog integration on the Integrations page.
A Datadog integration on the Integrations page.

  1. Click the Edit integration configuration button. The "Edit Datadog configuration" screen appears.

The Datadog configuration screen with the Edit integration configuration option called out.
The Datadog configuration screen with the Edit integration configuration option called out.

  1. Toggle to turn the integration off.

To permanently delete the Datadog integration:

  1. Navigate to the Integrations page.
  2. Find the integration you wish to modify and click Edit integration configuration. The "Edit 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.

Demonstration video

This video presents a demonstration of the integration. To read along, enable YouTube's closed captioning feature on the video.