• HOME
  • INTEGRATIONS
  • SDKS
  • GUIDES
  • API DOCS
No results for ""
EXPAND ALL
CLOSE
launchdarkly.com

EDIT ON GITHUB

Azure Event Hubs

Read time: 2 minutes
Last edited: Jul 29, 2020

Overview

This topic explains how to configure and use the Azure Event Hubs Data Export destination. By connecting your LaunchDarkly project to Azure Event Hubs, you can export LaunchDarkly SDK events from flags and environments to an Event Hub of your choosing.

Prerequisites

In order to use the Azure Event Hubs Data Export destination, you must meet the following prerequisites:

  • You must create a Shared Access Signature Policy in your Azure Event Hubs account at the Event Hub or the Namespace level
  • You must copy the key from this policy. To do this, read Creating a policy and key in Azure Event Hub.

Creating a policy and key in Azure Event Hub

Before you enable the Event Hubs destination in LaunchDarkly, you must configure a policy in Azure Event Hubs that lets an Event Hub or Namespace receive events.

Depending on your use case, you can configure a shared access signature policy for an Event Hubs Namespace or for any of its enclosed Event Hubs.

Here's how to configure a new policy:

  1. Log into Azure and click Event Hub.
  2. Choose the Namespace where you want LaunchDarkly to export events.
  3. Choose an Event Hub to which you wish to export events.
  4. Click into Shared Access Policies and click Add. The policy creation screen appears.
  5. Create a new policy with the Send permission enabled.

A new policy with the Send permission enabled, configured in Azure Event Hub
A new policy with the Send permission enabled, configured in Azure Event Hub

  1. Click Create. The new policy appears in the list.
  2. Click to open the policy and copy its primary key.

The new policy with its keys displayed
The new policy with its keys displayed

Save the key somewhere accessible to you, because you need it to set up the destination successfully.

Creating the Event Hubs destination in LaunchDarkly

After you copy and save the policy key in Event Hub, you can configure the Data Export destination in LaunchDarkly.

To connect the destination to LaunchDarkly:

  1. Navigate to the Integrations page in LaunchDarkly.
  2. Find "Azure Event Hubs" and click + Integration. The "Create a destination" screen appears.
  3. Give your destination a human-readable Name.
  4. Choose a LaunchDarkly Environment from which you wish to export events to Azure Event Hub.
  5. Enter the Event Hubs Namespace Name.
  6. Enter the Event Hub Name.
  7. Enter the Shared Access Signature Policy Name.
  8. Enter the Share Access Signature Key.
  9. Click Save Destination.

This connects your Azure Event Hub to your LaunchDarkly environment. To send events from specific flags or environments to Event Hub, you must enable data export for each flag or environment individually.

Testing the Azure Event Hubs destination

After you've saved the destination, send a test event to confirm that the destination is configured properly.

To test the destination:

  1. Navigate to the Integrations page in LaunchDarkly.
  2. Find "Azure Event Hubs" and click Edit. The "Edit destination" screen appears.
  3. In the "Send a test event" section, click Send Event.
  4. If you have configured the destination correctly, an event appears in the Azure Event Hubs destination.

Enabling Data Export for flags and environments

After you create a Data Export destination, you must start sending flag or environment event data to it. You can enable Data Export for individual flags, or for all the flags in an environment.

To learn more about exporting event data from flags and environments, read Exporting event data for flags and environments.

Deleting an Event Hubs destination

You can delete a Data Export destination from the Integrations screen.

To delete a destination:

  1. Navigate to the Integrations screen.
  2. Find the destination you wish to delete and click Edit. The "Edit destination" screen opens.
  3. Click Delete Destination.