Send deployment information to Accelerate
Read time: 3 minutes
Last edited: May 02, 2023
Accelerate is only available to members of LaunchDarkly's Early Access Program (EAP). If you want access to this feature, join the EAP.
This topic explains how to configure your application to send deployment information to Accelerate.
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:
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, or by clicking your display picture and selecting "Setup."
There are two options for sending deployment information:
Option 1: Set up automated deployment detection
To set up automated deployment detection, specify an application identifier and application version in the configuration options for the LaunchDarkly SDK. Then, update the application version each time you want to indicate a new deployment. To confirm whether your SDK supports these configuration options, read Application metadata configuration.
We recommend using this option if you want to minimize instrumenting your deployment pipeline. Using this method means all communication about deployment events occurs through LaunchDarkly SDK calls. The application identifier and application version are included in real-time flag events, and Accelerate analyzes this information to detect precisely when your end users start using an updated version.
You can set application identifier and application version configuration options for your LaunchDarkly SDKs. To learn how, read Application metadata configuration.
Set the application identifier
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.
Set the application version
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.
To enable Accelerate to detect and report which pull requests (PRs) are part of a deployment, set the application version to one of the following options:
- the full SHA of the GitHub commit for this deployment
- the tag associated with the GitHub commit for this deployment
Accelerate can only associate deployments with PRs or commits if you use one of these options.
To retrieve the SHA for your deployment:
- From the branch you are deploying, run
git rev-parse HEAD.
- Add an environment variable, such as
- 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.
Option 2: Send events from your deployment pipeline
You can configure webhooks from your deployment pipeline to send your deployment events to Accelerate.
We recommend this option 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.
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.
Additional Accelerate setup
To finish setting up Accelerate, you may also need to Install the GitHub app and Set up code references. To learn more, read Confirm your setup.