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

    EDIT ON GITHUB

    Getting started with Accelerate

    Read time: 5 minutes
    Last edited: Feb 02, 2023
    This feature is for Early Access Program customers only

    Accelerate is only available to members of LaunchDarkly's Early Access Program (EAP). If you want access to this feature, join the EAP.

    Overview

    This topic explains how to set up projects, environments, and applications, and begin using Accelerate.

    Concepts

    You should understand the following concepts before you set up your Accelerate dashboard.

    Projects and environments

    Accelerate uses all the same projects and environments that you've already set up as part of your feature management. Projects let you manage multiple different business objectives from one LaunchDarkly account. Environments are organizational units contained within projects. They allow you to manage your feature flags throughout your development lifecycle.

    To learn more, read Projects and Environments.

    Applications

    Applications are a part of your code base for which you want to track deployments. Applications usually correspond to a single repository in your version control system. To learn more, read Applications.

    Getting started

    You can get started with Accelerate by following the instructions in the "Let's get you set up" prompts in the Accelerate user interface (UI). The release frequency and flag health metrics are available as soon as you access Accelerate and don't need any additional configuration.

    The setup instructions guide you through configuring deployment information, installing the GitHub app, and setting up code references:

    The "Welcome to Accelerate" dialog in Accelerate.
    The "Welcome to Accelerate" dialog in Accelerate.

    You can click the arrow icon next to each step to view detailed instructions. Alternatively, you can follow the instructions below.

    Here's how to get started using Accelerate:

    1. Join the Early Access Program
    2. Configure your application to send deployment information
    3. Install the GitHub app
    4. Set up code references
    5. Confirm your setup

    Step 1: Join the Early Access Program

    Reach out to your Early Access Program (EAP) account contact and confirm that Accelerate is enabled for your account. After they enable it, you can access Accelerate from the product switcher menu in the LaunchDarkly user interface.

    From your feature flag list, click the product switcher menu and choose Accelerate:

    The product switcher menu, with "Accelerate" highlighted.
    The product switcher menu, with "Accelerate" highlighted.

    Step 2: Configure your application to send deployment information

    Configuring your application to send deployment information to Accelerate lets Accelerate track the frequency and timing of your deployments. We calculate deployment frequency by receiving deployment start and end times from your pipeline.

    Until you configure it, the application will prompt you to set up your deployment pipeline:

    The deployment frequency metric prompting you to set up to your deployment pipeline.
    The deployment frequency metric prompting you to set up to your deployment pipeline.

    Click Set up to view the instructions or Dismiss to hide the prompt. If you dismiss the prompt, you can still read the instructions for setting up your deployment pipeline using the Get started button at the bottom of the screen.

    There are two options for sending deployment information:

    Option 1: Set the application identifier and version

    We recommend option 1, setting the application identifier and version, if you want to minimize instrumenting your deployment pipeline. Using this method means all communication about deployment events occurs through LaunchDarkly SDK calls.

    Expand application configuration instructions

    You can set application identifier and application version configuration options for your LaunchDarkly SDKs.

    Accelerate assumes the application identifier is the application key. Typically this is the name of one of the GitHub repositories that you use in this project. Accelerate automatically creates a new application each time you send a unique application identifier.

    You can set the application version to any string that includes only letters, numbers, periods (.), hyphens (-), or underscores (_). For example, you could set this to the semantic version of your application.

    We recommend setting the application version to the full SHA of the GitHub commit for this deployment. When you use the SHA, Accelerate automatically detects and reports which pull requests (PRs) are part of a deployment. Otherwise, Accelerate cannot associate deployments with PRs or commits.

    To retrieve the SHA for your deployment:

    1. From the branch you are deploying, run git rev-parse HEAD.
    2. Add an environment variable, such as APPLICATION_VERSION.
    3. Use that environment variable when you initialize your SDK.

    In some cases, the SHA may not be available when you deploy. If you package the SHA into your build artifact, you can avoid using environment variables. For example, Go applications often inject version information using ldflags. To learn more, read Using ldflags to Set Version Information for Go Applications.

    The following client-side SDKs support the application identifier and application version configuration options:

    The following server-side SDKs support the application identifier and application version configuration options:

    Option 2: Configure webhooks

    We recommend option 2, configuring webhooks, in the following scenarios:

    • You are using an SDK that does not support the application identifier and version configuration options.
    • You anticipate having a large number of application versions reporting at once. For example, if you have a large front-end application, especially a single-page application, you might have dozens of application versions being reported, because you have end users working from long-running versions. It may simplify your deployment frequency metrics to send information directly from your deployment pipeline rather than relying on SDK calls.
    • You want to monitor how long your deployments take to complete. If you use application identifier and version configuration options, then Accelerate will report when a deployment occurred. If you use webhooks to send separate events for each deployment's start and finish, then Accelerate will report on deployment duration as well.
    Expand webhook configuration instructions

    You can configure webhooks from your deployment pipeline to send your deployment events to Accelerate.

    Everyone's deployment pipeline is different. We recommend sending deployment events when each deployment has started, finished, or failed. To learn how to construct a deployment event request, read Deployment events API.

    Step 3: Install the GitHub app

    Adding the LaunchDarkly GitHub app to your existing GitHub organization lets Accelerate track pull request and commit frequency and timing. Accelerate uses this information to calculate deployment lead time and other metrics.

    Until you configure it, the application will prompt you to connect to GitHub:

    The lead time metric prompting you to connect to GitHub.
    The lead time metric prompting you to connect to GitHub.

    Click Set up to view the instructions or Dismiss to hide the prompt. If you dismiss the prompt, you can still read the instructions for connecting to GitHub using the Get started button at the bottom of the screen.

    Follow the OAuth workflow to install the app automatically. After you accept the installation, you'll be redirected back to Accelerate.

    After you install the app, activity data for the repositories you chose will flow into Accelerate. Historical data from the repositories will populate in Accelerate automatically.

    Step 4: Set up code references

    Set up code references for each code base in which you use flags. This allows Accelerate to correlate changes to flags in code with PRs and deployments.

    Until you configure it, the application will prompt you to set up code references:

    The flag coverage metric prompting you to set up code references.
    The flag coverage metric prompting you to set up code references.

    Click Set up to view the instructions or Dismiss to hide the prompt. If you dismiss the prompt, you can still read the instructions for setting up code references using the Get started button at the bottom of the screen.

    To learn how to set up code references, read Code references.

    Step 5: Confirm your setup

    To confirm you have set up everything correctly:

    • Check for data on the Deployment frequency metric view. After you have set up and sent at least one deployment event, the deployment frequency chart and the deployments table will start filling with data.

    • Check for data on the Lead time metric view. After you have set up the GitHub app, Accelerate will start receiving commit and PR information for all future PRs. Accelerate will also backfill events for the last 90 days, although this can take up to 24 hours to complete. The lead time chart and the pull requests list will start filling with data.

    • Check for code reference data on the pull requests list on the Flag coverage metric view. After you set up code references, future PRs that add, remove, or change a flag in code will show the flags modified in the "Flags" column.

    Learn more

    To learn more about Accelerate events and applications, explore the topics in this category:

    • Applications
    • Deployment events API