Loading...
Loading...
Configure guarded rollouts with progressive traffic increases, metric monitoring, and automatic rollback. Use when releasing features gradually with safety thresholds.
npx skill4agent add launchdarkly/agent-skills launchdarkly-guarded-rolloutstart-guarded-rolloutget-flaglist-metricsstop-guarded-rollouttoggle-flagcreate-metric| Component | Description |
|---|---|
| Test variation | The new variation being rolled out |
| Control variation | The existing/baseline variation |
| Stages | Steps with increasing traffic percentage and monitoring windows |
| Metrics | What to monitor for regressions (error rate, latency, etc.) |
| Regression threshold | How much a metric can degrade before triggering action |
| On regression | Whether to notify, rollback, or both when a threshold is breached |
10001000050000100000360000086400000604800000get-flaglist-metricstoggle-flag| Stage | Traffic | Monitoring Window | Purpose |
|---|---|---|---|
| 1 | 1% | 1 hour | Smoke test — catch obvious crashes |
| 2 | 10% | 24 hours | Early signal on metrics |
| 3 | 50% | 24 hours | Confidence building |
| 4 | 100% | 24 hours | Full rollout with monitoring |
| Metric Type | Example | Threshold | Action |
|---|---|---|---|
| Error rate | | 0.05 (5% increase) | Rollback |
| Latency | | 0.2 (20% increase) | Notify |
| Conversion | | 0.1 (10% decrease) | Notify + Rollback |
start-guarded-rollout{
"projectKey": "my-project",
"flagKey": "new-checkout-flow",
"environmentKey": "production",
"testVariationId": "variation-id-for-new-flow",
"controlVariationId": "variation-id-for-current-flow",
"randomizationUnit": "user",
"stages": [
{"rolloutWeight": 1000, "monitoringWindowMilliseconds": 3600000},
{"rolloutWeight": 10000, "monitoringWindowMilliseconds": 86400000},
{"rolloutWeight": 50000, "monitoringWindowMilliseconds": 86400000},
{"rolloutWeight": 100000, "monitoringWindowMilliseconds": 86400000}
],
"metrics": [
{
"metricKey": "api-error-rate",
"onRegression": {"notify": true, "rollback": true},
"regressionThreshold": 0.05
},
{
"metricKey": "checkout-completed",
"onRegression": {"notify": true, "rollback": false},
"regressionThreshold": 0.1
}
]
}get-flag{
"projectKey": "my-project",
"flagKey": "new-checkout-flow",
"environmentKey": "production"
}| Situation | Action |
|---|---|
| Flag is off | Turn it on first with |
| Active rollout exists | Stop it first with |
| No suitable metrics | Create metrics first with |
| Approval required | If the environment requires approvals, the tool will return an approval URL |