Skip to main content

Getting started with release management

YouTube video player 1 thumbnail
Click to load video
Availability

Plan: Enterprise | Version: 7.2+

Overview

This guide walks you through using Unleash's release management features to automate and safeguard your feature rollouts. You'll learn how to:

By the end of this guide, you'll have a fully automated release pipeline that can detect issues and stop the rollout before they affect more users.

Prerequisites

Before you begin, make sure you have:

  • An Unleash Enterprise instance
  • A feature flag to work with
  • The Node SDK configured in your application (for impact metrics)

Step 1: Add a release template to your feature flag

Release templates help you standardize your rollout process. Instead of manually configuring strategies, you can apply a predefined sequence of milestones.

  1. In the Admin UI, open your feature flag and select the target environment.
  2. Click Use template and select a release template (for example, a progressive rollout template).
  3. Click Add release plan.

After adding the release plan, you'll see a series of milestones. For a typical progressive rollout, these might be:

  • Milestone 1: 25% of users
  • Milestone 2: 50% of users
  • Milestone 3: 75% of users
  • Milestone 4: 100% of users

Each milestone has its own strategy configuration, giving you full control over how the feature is exposed at each stage.

Step 2: Configure automated progressions

Instead of manually starting each milestone, you can automate the progression based on time intervals.

  1. On a milestone, click Add automation.
  2. Set the time interval. For example, "proceed to the next milestone after 5 hours."
  3. Repeat for each milestone you want to automate.
  4. Click Start on the first milestone to begin the release.

Once started, Unleash will automatically advance through the milestones based on your configured intervals. You can see when the next milestone will start in the milestone status.

info

The slight variance in timing is due to how Unleash schedules background jobs. Transitions may occur a few seconds after the configured interval.

Step 3: Set up impact metrics in your application

Automated rollouts are powerful, but you want to make sure you can stop them if something goes wrong. Impact metrics allow you to track application-level data and use it to control your release.

In your application code, define and record metrics using the Unleash SDK:

import express from 'express';
import { Unleash } from 'unleash-client';

const app = express();
const PORT = process.env.PORT || 3000;

// Setup Unleash
const unleash = new Unleash({
url: process.env.UNLEASH_URL || 'UNLEASH_URL',
appName: 'YOUR_APP_NAME',
customHeaders: {
Authorization: process.env.UNLEASH_API_TOKEN || 'UNLEASH_API_TOKEN',
},
});

unleash.on('ready', console.log.bind(console, 'Unleash client is ready'));
unleash.on('error', console.error);

// Define your impact metric
unleash.impactMetrics.defineCounter('analyze_feature_error', "Counts the number of errors during feature analysis");

// Example usage
const AnalyzeService = () => {
return () => {
try {
throw new Error("Simulated analysis error");
} catch(error) {
unleash.impactMetrics.incrementCounter('analyze_feature_error');
}
}
}

const analyze = AnalyzeService();

app.get('/api/analytics', (req, res) => {
const userId = 3;
const context = { userId };

if (unleash.isEnabled('ai-analytics', context)) {
analyze();
} else {
console.log("AI Insights feature is disabled for user:", userId);
}

res.status(200).send();
});

app.listen(PORT, () => {
console.log(`\n🚀 Acme API running on http://localhost:${PORT}\n`)
});

The key pattern is:

  1. Define the metric using unleash.impactMetrics.defineCounter() with a descriptive name
  2. Increment the counter when relevant events occur, such as errors in your feature code

By using feature-specific error metrics, you can distinguish between errors caused by your new feature versus unrelated system issues.

tip

Feature-specific error counters are more actionable than global error rates. They help you determine whether your feature specifically caused a problem, rather than being triggered by unrelated issues.

Step 4: Configure a safeguard

With metrics flowing into Unleash, you can now create a safeguard that pauses the automated progression when something goes wrong.

First, verify your metric is available by selecting Add safeguard and checking that your impact metric exists in the dropdown list. It may take some time for the impact metric to appear after starting your process, because it is sent to Unleash when the client reports metrics, which happens by default on a 60s interval.

Then, add a safeguard to your release plan:

  1. Select Add safeguard on your release plan
  2. Select your impact metric from the dropdown.
  3. Configure the threshold. For example:
    • Metric: analyze_feature_error
    • Aggregation: Count
    • Condition: More than 10 in the last 15 minutes
  4. Save the safeguard.

When the metric exceeds the threshold, Unleash will pause the automated progression.

Step 5: Observe safeguard behavior

When a safeguard is triggered:

  • The automation pauses at the current milestone
  • The feature will still be enabled for existing users
  • No further milestone transitions occur automatically

To continue the rollout after investigating the issue:

  1. Review the impact metrics to understand what happened.
  2. Fix the underlying issue in your application.
  3. Click Resume to restart the automated progression.

This behavior gives you the best of both worlds: automated rollouts that save time, with safety nets that prevent widespread issues.

Next steps

Now that you've set up automated releases with safeguards, explore these related topics:

  • Release templates: Learn more about creating and customizing release templates
  • Impact metrics: Explore the full range of metric types (counters, gauges, histograms)
  • Gradual rollout: Understand the underlying rollout strategy concepts