|
| 1 | +LaunchDarkly Integration with Robusta |
| 2 | +===================================== |
| 3 | + |
| 4 | +.. note:: |
| 5 | + This feature is available with the Robusta SaaS platform and self-hosted commercial plans. It is not available in the open-source version. |
| 6 | + |
| 7 | +This guide explains how to route LaunchDarkly feature flag changes to Robusta's UI via a webhook. |
| 8 | + |
| 9 | +Requirements |
| 10 | +------------ |
| 11 | + |
| 12 | +- Robusta must already be deployed and running in your environment. |
| 13 | +- You have admin access to the Robusta UI (to create API keys and view your ``account_id``). |
| 14 | +- You have admin access to LaunchDarkly (to create webhook integrations). |
| 15 | + |
| 16 | +Integration Steps |
| 17 | +----------------- |
| 18 | + |
| 19 | +We will configure: |
| 20 | + |
| 21 | +1. A Robusta API key and account ID. |
| 22 | +2. A LaunchDarkly **Webhook Integration** pointing to Robusta. |
| 23 | +3. Configure the webhook to send feature flag change events. |
| 24 | + |
| 25 | +Step 1: Get Account ID and API Key |
| 26 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 27 | + |
| 28 | +Obtain your Robusta ``account_id`` and create an API key: |
| 29 | + |
| 30 | +1. In the Robusta UI, navigate to **Settings → API Keys**. |
| 31 | +2. Click **New API Key**. |
| 32 | +3. Name the key **LaunchDarkly**, grant it **Read/Write** access to alerts, and click **Generate API Key**. |
| 33 | +4. Copy and securely store the generated API key. |
| 34 | +5. In **Settings → Workspace**, copy your **account_id**. |
| 35 | + |
| 36 | +Step 2: Create a Webhook Integration in LaunchDarkly |
| 37 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 38 | + |
| 39 | +In LaunchDarkly: |
| 40 | + |
| 41 | +1. Go to **Settings → Integrations → Webhook**. |
| 42 | +2. Click the **Add integration** button. |
| 43 | +3. Configure: |
| 44 | + |
| 45 | + - **Name**: ``Robusta`` |
| 46 | + - **URL**: ``https://api.robusta.dev/integrations/generic/launchdarkly?api_key=YOUR_API_KEY_HERE&account_id=YOUR_ACCOUNT_ID_HERE`` |
| 47 | + - Replace ``YOUR_API_KEY_HERE`` with the API key from Step 1. |
| 48 | + - Replace ``YOUR_ACCOUNT_ID_HERE`` with your account ID from Step 1. |
| 49 | + |
| 50 | +4. **Statement**: Click the Add the statement button. |
| 51 | +5. **Resource type**: Select **FLAG**. |
| 52 | +6. **Select flags**: Choose the specific flags you want to monitor, or select all. |
| 53 | +7. **Project and environments**: Select the projects and environments you want to track. |
| 54 | +8. Save the integration. |
| 55 | + |
| 56 | +.. Note:: |
| 57 | + |
| 58 | + Other resource types other than **FLAG** are not verified to work though they might function without additional configuration. |
| 59 | + |
| 60 | +Alternative: Using Headers Instead of URL Parameters |
| 61 | +-------------------------------------------------- |
| 62 | + |
| 63 | +Including API keys in URLs can expose them in logs, browser history, and monitoring tools. A more secure approach is to send the key in the request headers whenever possible. |
| 64 | + |
| 65 | +If you’re using a third-party service that supports custom headers, configure the webhook like this: |
| 66 | + |
| 67 | +- **URL**: ``https://api.robusta.dev/integrations/generic/launchdarkly?account_id=YOUR_ACCOUNT_ID_HERE`` |
| 68 | +- **Headers**: |
| 69 | + |
| 70 | + .. code-block:: http |
| 71 | +
|
| 72 | + Authorization: Bearer <api-key> |
| 73 | +
|
| 74 | +
|
| 75 | +What Gets Tracked |
| 76 | +----------------- |
| 77 | + |
| 78 | +The integration automatically tracks: |
| 79 | + |
| 80 | +- **Feature flag changes**: When flags are turned on/off, created, or modified |
| 81 | +- **Environment changes**: Changes to flag configurations in specific environments |
| 82 | +- **Member actions**: Who made the changes and when |
| 83 | +- **Configuration diffs**: Before and after states of flag configurations |
| 84 | +- **Approval workflows**: Approval requests and status changes |
| 85 | + |
| 86 | +Alert Information |
| 87 | +----------------- |
| 88 | + |
| 89 | +Each LaunchDarkly change creates a Robusta alert with: |
| 90 | + |
| 91 | +- **Title**: Descriptive title showing who made the change and what flag was affected |
| 92 | +- **Description**: Detailed information about the change, including member details |
| 93 | +- **Labels**: Flag key, environment, action type, and source information |
| 94 | +- **Evidence**: |
| 95 | + - Configuration diff showing before/after states |
| 96 | + - Markdown summary with flag details, project, environment, and reason |
| 97 | +- **Fingerprint**: Unique identifier for change aggregation |
| 98 | + |
| 99 | +Validation |
| 100 | +---------- |
| 101 | + |
| 102 | +1. Make a test change to a feature flag in LaunchDarkly (turn it on/off, modify targeting, etc.). |
| 103 | +2. In Robusta's UI, verify the alert appears with: |
| 104 | + - Correct flag name and environment |
| 105 | + - Member information (who made the change) |
| 106 | + - Configuration diff showing the change |
| 107 | + - Proper labels and annotations |
| 108 | + |
| 109 | +Troubleshooting |
| 110 | +--------------- |
| 111 | + |
| 112 | +- **No alerts appearing**: Verify the webhook URL is correct and the API key has proper permissions. |
| 113 | +- **Missing member information**: Ensure the LaunchDarkly webhook payload includes member details. |
| 114 | +- **Wrong environment**: Check that the correct projects and environments are selected in the LaunchDarkly webhook configuration. |
| 115 | +- **Missing configuration diffs**: Ensure the webhook is configured to send both ``previousVersion`` and ``currentVersion`` data. |
| 116 | + |
| 117 | +For additional support, check the Robusta logs for any LaunchDarkly webhook processing errors. |
| 118 | + |
| 119 | +Holmes Configuration |
| 120 | +------------------- |
| 121 | + |
| 122 | +To enable Holmes to pull LaunchDarkly changes into the AI assistant, add the following configuration to your ``generated_values.yaml`` file and upgrade the Robusta Helm chart: |
| 123 | + |
| 124 | +.. code-block:: yaml |
| 125 | +
|
| 126 | + holmes: |
| 127 | + additionalEnvVars: |
| 128 | + - name: PULL_EXTERNAL_FINDINGS |
| 129 | + value: "true" |
| 130 | +
|
| 131 | +After updating the configuration: |
| 132 | + |
| 133 | +1. Save the ``generated_values.yaml`` file. |
| 134 | +2. Run: ``helm upgrade robusta robusta/robusta -f generated_values.yaml`` |
| 135 | +3. Restart the Holmes pod to pick up the new environment variable. |
| 136 | + |
| 137 | +This enables Holmes to access and analyze LaunchDarkly feature flag changes, allowing you to ask questions like: |
| 138 | +- "What feature flags were changed recently?" |
| 139 | +- "Who modified the authentication flag?" |
| 140 | +- "Show me all flag changes in the production environment." |
0 commit comments