-
Notifications
You must be signed in to change notification settings - Fork 309
[ROB-2343] Launchdarkly docs #1942
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
140 changes: 140 additions & 0 deletions
140
docs/configuration/alertmanager-integration/launchdarkly.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,140 @@ | ||
| LaunchDarkly Integration with Robusta | ||
| ===================================== | ||
|
|
||
| .. note:: | ||
| This feature is available with the Robusta SaaS platform and self-hosted commercial plans. It is not available in the open-source version. | ||
|
|
||
| This guide explains how to route LaunchDarkly feature flag changes to Robusta's UI via a webhook. | ||
|
|
||
| Requirements | ||
| ------------ | ||
|
|
||
| - Robusta must already be deployed and running in your environment. | ||
| - You have admin access to the Robusta UI (to create API keys and view your ``account_id``). | ||
| - You have admin access to LaunchDarkly (to create webhook integrations). | ||
|
|
||
| Integration Steps | ||
| ----------------- | ||
|
|
||
| We will configure: | ||
|
|
||
| 1. A Robusta API key and account ID. | ||
| 2. A LaunchDarkly **Webhook Integration** pointing to Robusta. | ||
| 3. Configure the webhook to send feature flag change events. | ||
|
|
||
| Step 1: Get Account ID and API Key | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
|
||
| Obtain your Robusta ``account_id`` and create an API key: | ||
|
|
||
| 1. In the Robusta UI, navigate to **Settings → API Keys**. | ||
| 2. Click **New API Key**. | ||
| 3. Name the key **LaunchDarkly**, grant it **Read/Write** access to alerts, and click **Generate API Key**. | ||
| 4. Copy and securely store the generated API key. | ||
| 5. In **Settings → Workspace**, copy your **account_id**. | ||
|
|
||
| Step 2: Create a Webhook Integration in LaunchDarkly | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
|
||
| In LaunchDarkly: | ||
|
|
||
| 1. Go to **Settings → Integrations → Webhook**. | ||
| 2. Click the **Add integration** button. | ||
| 3. Configure: | ||
|
|
||
| - **Name**: ``Robusta`` | ||
| - **URL**: ``https://api.robusta.dev/integrations/generic/launchdarkly?api_key=YOUR_API_KEY_HERE&account_id=YOUR_ACCOUNT_ID_HERE`` | ||
| - Replace ``YOUR_API_KEY_HERE`` with the API key from Step 1. | ||
| - Replace ``YOUR_ACCOUNT_ID_HERE`` with your account ID from Step 1. | ||
|
|
||
| 4. **Statement**: Click the Add the statement button. | ||
| 5. **Resource type**: Select **FLAG**. | ||
| 6. **Select flags**: Choose the specific flags you want to monitor, or select all. | ||
| 7. **Project and environments**: Select the projects and environments you want to track. | ||
| 8. Save the integration. | ||
|
|
||
| .. Note:: | ||
|
|
||
| Other resource types other than **FLAG** are not verified to work though they might function without additional configuration. | ||
|
|
||
| Alternative: Using Headers Instead of URL Parameters | ||
| -------------------------------------------------- | ||
|
|
||
| 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. | ||
|
|
||
| If you’re using a third-party service that supports custom headers, configure the webhook like this: | ||
|
|
||
| - **URL**: ``https://api.robusta.dev/integrations/generic/launchdarkly?account_id=YOUR_ACCOUNT_ID_HERE`` | ||
| - **Headers**: | ||
|
|
||
| .. code-block:: http | ||
|
|
||
| Authorization: Bearer <api-key> | ||
|
|
||
|
|
||
| What Gets Tracked | ||
| ----------------- | ||
|
|
||
| The integration automatically tracks: | ||
|
|
||
| - **Feature flag changes**: When flags are turned on/off, created, or modified | ||
| - **Environment changes**: Changes to flag configurations in specific environments | ||
| - **Member actions**: Who made the changes and when | ||
| - **Configuration diffs**: Before and after states of flag configurations | ||
| - **Approval workflows**: Approval requests and status changes | ||
|
|
||
| Alert Information | ||
| ----------------- | ||
|
|
||
| Each LaunchDarkly change creates a Robusta alert with: | ||
|
|
||
| - **Title**: Descriptive title showing who made the change and what flag was affected | ||
| - **Description**: Detailed information about the change, including member details | ||
| - **Labels**: Flag key, environment, action type, and source information | ||
| - **Evidence**: | ||
| - Configuration diff showing before/after states | ||
| - Markdown summary with flag details, project, environment, and reason | ||
| - **Fingerprint**: Unique identifier for change aggregation | ||
|
|
||
| Validation | ||
| ---------- | ||
|
|
||
| 1. Make a test change to a feature flag in LaunchDarkly (turn it on/off, modify targeting, etc.). | ||
| 2. In Robusta's UI, verify the alert appears with: | ||
| - Correct flag name and environment | ||
| - Member information (who made the change) | ||
| - Configuration diff showing the change | ||
| - Proper labels and annotations | ||
|
|
||
| Troubleshooting | ||
| --------------- | ||
|
|
||
| - **No alerts appearing**: Verify the webhook URL is correct and the API key has proper permissions. | ||
| - **Missing member information**: Ensure the LaunchDarkly webhook payload includes member details. | ||
| - **Wrong environment**: Check that the correct projects and environments are selected in the LaunchDarkly webhook configuration. | ||
| - **Missing configuration diffs**: Ensure the webhook is configured to send both ``previousVersion`` and ``currentVersion`` data. | ||
|
|
||
| For additional support, check the Robusta logs for any LaunchDarkly webhook processing errors. | ||
|
|
||
| Holmes Configuration | ||
| ------------------- | ||
|
|
||
| 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: | ||
|
|
||
| .. code-block:: yaml | ||
|
|
||
| holmes: | ||
| additionalEnvVars: | ||
| - name: PULL_EXTERNAL_FINDINGS | ||
| value: "true" | ||
|
|
||
| After updating the configuration: | ||
|
|
||
| 1. Save the ``generated_values.yaml`` file. | ||
| 2. Run: ``helm upgrade robusta robusta/robusta -f generated_values.yaml`` | ||
| 3. Restart the Holmes pod to pick up the new environment variable. | ||
|
|
||
| This enables Holmes to access and analyze LaunchDarkly feature flag changes, allowing you to ask questions like: | ||
| - "What feature flags were changed recently?" | ||
| - "Who modified the authentication flag?" | ||
| - "Show me all flag changes in the production environment." | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.