No results for ""
EXPAND ALL
  • Home
  • API docs

GIVE DOCS FEEDBACK

Azure Event Hubs

Read time: 3 minutes
Last edited: Sep 21, 2023

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 panel 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 Add integration. The "Create a destination" panel 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 an Azure Event Hubs destination

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

To send a test event:

  1. Navigate to the Integrations page and find "Azure Event Hubs."
  2. Click into the "Azure Event Hubs" section to display a list of destinations.
  3. Click the edit icon next to the destination you want to test. The "Edit destination" panel appears.
  4. In the "Send a test event" section, click Send event.
  5. 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 page and find "Azure Event Hubs."
  2. Click into the "Azure Event Hubs" section to display a list of destinations.
  3. Click the edit icon next to the destination you wish to delete. The "Edit destination" panel appears.
  4. Click Delete destination.