Skip to content

Commit 105fb0d

Browse files
authored
Restructure feature toggle documentation (#3112)
Feature toggle documentation is now broken into 3 sections: - Overview: Introduction, getting started, and misc (default values). - Targeting: Targeting controls within an environment. - Providers: List of provider libraries. There are minimal content changes in here (other than adding a few icons and moving a few lines around where it made sense after the restructure). I'll be following this up with some other PRs to add content for all of the new features that we have added over the past few months.
1 parent fe8328b commit 105fb0d

3 files changed

Lines changed: 114 additions & 92 deletions

File tree

Lines changed: 21 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
11
---
22
layout: src/layouts/Default.astro
33
pubDate: 2025-05-21
4-
modDate: 2025-05-21
5-
title: Feature Toggles
6-
navTitle: Feature Toggles
4+
modDate: 2026-04-20
5+
title: Feature Toggles
6+
icon: fa-solid fa-toggle-on
7+
navTitle: Overview
78
navSection: Feature Toggles
89
description: Octopus Feature Toggles allow progressive delivery of changes and instant rollback
9-
navOrder: 95
10+
navOrder: 95
1011
---
1112

1213
Octopus Feature Toggles support toggling features on or off in real-time, without redeploying, and progressively releasing changes to subsets of your users.
1314

1415
:::div{.hint}
15-
Octopus Feature Toggles are currently in Alpha, available to a small set of customers.
16+
Octopus Feature Toggles are currently in Alpha, available to a small set of customers.
1617

1718
If you are interested in this feature please register your interest on the [roadmap card](https://roadmap.octopus.com/c/121-feature-toggles) and we'll keep you updated.
1819
:::
1920

20-
## Usage
21+
## Usage
2122

22-
### Create a Feature Toggle
23+
### Create a Feature Toggle
2324

24-
Feature Toggles are located within Octopus Projects:
25+
Feature Toggles are located within Octopus Projects:
2526
**Project ➜ Feature Toggles**
2627

2728
Create a new Toggle and give it name.
@@ -32,17 +33,17 @@ Create a new Toggle and give it name.
3233

3334
Octopus Feature Toggles rely on [OpenFeature](https://openfeature.dev/) as the client SDK.
3435

35-
Follow the [OpenFeature guide for installing the SDK for your language](https://openfeature.dev/ecosystem?instant_search%5BrefinementList%5D%5Btype%5D%5B0%5D=SDK) into your application.
36+
Follow the [OpenFeature guide for installing the SDK for your language](https://openfeature.dev/ecosystem?instant_search%5BrefinementList%5D%5Btype%5D%5B0%5D=SDK) into your application.
3637

37-
Configure OpenFeature to use the [Octopus Provider](#providers).
38+
Configure OpenFeature to use the [Octopus Provider](/docs/feature-toggles/providers).
3839

3940
The Octopus OpenFeature Provider requires a client identifier when instantiated. This is a [JWT](https://jwt.io/introduction) which specifies the Octopus Project, Environment, and Tenant (if applicable). This tells the Octopus Feature Toggle service which set of toggles to evaluate.
4041

4142
:::div{.hint}
42-
The Octopus Feature Toggle client identifier is available via the Octopus variable `Octopus.FeatureToggles.ClientIdentifier` or via the Feature Toggle UI (see below).
43+
The Octopus Feature Toggle client identifier is available via the Octopus variable `Octopus.FeatureToggles.ClientIdentifier` or via the Feature Toggle UI (see below).
4344
:::
4445

45-
For applications deployed by Octopus, the recommended way is to have Octopus inject the client identifier as part of deployment, for example by injecting it into a configuration file or environment variable. The client identifier is made available via the Octopus variable `Octopus.FeatureToggles.ClientIdentifier`.
46+
For applications deployed by Octopus, the recommended way is to have Octopus inject the client identifier as part of deployment, for example by injecting it into a configuration file or environment variable. The client identifier is made available via the Octopus variable `Octopus.FeatureToggles.ClientIdentifier`.
4647

4748
For applications not deployed by Octopus, or cannot have the client identifier supplied during deployment for any reason, the client identifier can be obtained via the portal UI, as shown below.
4849

@@ -52,7 +53,7 @@ For applications not deployed by Octopus, or cannot have the client identifier s
5253

5354
The previewed client identifier may then be copied into your application configuration.
5455

55-
For example, an ASP.NET application could have an `appsettings.json` file which contained the following:
56+
For example, an ASP.NET application could have an `appsettings.json` file which contained the following:
5657

5758
```json
5859
{
@@ -80,7 +81,7 @@ await OpenFeature.Api.Instance.SetProviderAsync(octopusProvider);
8081

8182
### Evaluate a Toggle
8283

83-
The [Provider](#providers) for each language documents how to evaluate toggles.
84+
The [Provider](/docs/feature-toggles/providers) for each language documents how to evaluate toggles.
8485

8586
You will need the Toggle slug in order to reference the toggle in code. This can be found in the Octopus portal:
8687

@@ -94,93 +95,21 @@ var darkModeEnabled = await featureClient.GetBooleanValueAsync("dark-mode", fals
9495

9596
The second argument is the default value. Read more about [default values](#default-values) below.
9697

97-
### Rollout
98-
To enable your toggle for an environment, add the environment to the Toggle.
98+
### Rollout
99+
100+
To enable your toggle for an environment, add the environment to the Toggle.
99101

100102
![Add Environment button](/docs/img/feature-toggles/add-environment-button.png)
101103

102104
Select your environment, and whether you want the toggle on or off.
103105

104106
![Add Environment dialog](/docs/img/feature-toggles/add-environment-dialog.png)
105107

106-
You can additionally target specific [Tenants](#tenants) or [User Segments](#segments).
107-
108-
## Providers {#providers}
109-
110-
Below are the Octopus OpenFeature provider SDKs currently available:
111-
112-
### Server SDKs
113-
- [.NET](https://github.com/OctopusDeploy/openfeature-provider-dotnet)
114-
- [Java](https://github.com/OctopusDeploy/openfeature-provider-java)
115-
116-
### Web SDKs
117-
- [TypeScript/JavaScript](https://github.com/OctopusDeploy/openfeature-provider-ts-web)
118-
119-
Configuring the providers is documented in the README files in the repositories.
120-
121-
## Segments {#segments}
122-
123-
Segments allow enabling a toggle for a subset of users.
124-
125-
Segments are key/value pairs, and are supplied by your applications via the [OpenFeature EvaluationContext](https://openfeature.dev/docs/reference/concepts/evaluation-context).
126-
127-
128-
Common segment examples include:
129-
130-
- Specific users. e.g. `user-id/123456`
131-
- Specific accounts. e.g. `account-id/123456`
132-
- License types. e.g. `license-type/free`
133-
- Geographic regions. e.g. `region/eu`
134-
- Rollout rings. e.g. `ring/early-adopter`
135-
136-
The Evaluation Context can be supplied at different points in your application, for example:
137-
138-
- On start-up
139-
- During each web request
140-
- At the evaluation site
141-
142-
The following example shows adding a key/value to the evaluation context in C#.
143-
144-
```cs
145-
// The client would be injected by IoC in many cases
146-
var client = OpenFeature.Api.Instance.GetClient();
147-
// The following is hard-coded, whereas a real-world use would set this dynamically
148-
client.SetContext(EvaluationContext.Builder().Set("license-type", "free").Build());
149-
```
150-
151-
Segments can then be configured for Environments on the Feature Toggle in Octopus.
152-
153-
![Add Segment](/docs/img/feature-toggles/segment-add.png)
154-
155-
A Toggle evaluation will match on segments if the evaluation context matches at least one segment for each key.
156-
157-
Some examples:
158-
159-
|Segments | Evaluation Context | Result |
160-
|-----------|--------------------|--------|
161-
| `user-id/123456` | `user-id/123456` | `On` |
162-
| `user-id/123456` | `user-id/789383` | `Off` |
163-
| `license-type/free` `region/Asia` `region/EU` | `license-type/free` `region/Asia` | `On` |
164-
| `license-type/free` `region/Asia` `region/EU` | `license-type/free` `region/US` | `Off` |
165-
166-
## Tenants {#tenants}
167-
168-
If your Project uses [Tenants](/docs/tenants/), then Toggles may be enabled for subsets of your Tenants.
169-
170-
The options for configuring a Feature Toggle for Tenants are:
171-
172-
- All Tenants
173-
- Specific Tenants Included
174-
- % of Tenants
175-
- Specific Tenants Excluded
176-
177-
For example, the configuration shown below will result in the Toggle evaluating as `On` for 10% of Tenants, always including `Acme` and never including `Cyberdyne Systems`.
178-
179-
![Tenanted Rollout](/docs/img/feature-toggles/tenant-rollout.png)
108+
You can additionally control rollout within an environment. See [Feature Toggle targeting](/docs/feature-toggles/targeting) for more information.
180109

181110
## Default Values {#default-values}
182111

183-
Toggle default values are configured both on the Toggle in Octopus, and at the evaluation site in your client application. It's important to understand how these interact.
112+
Toggle default values are configured both on the Toggle in Octopus, and at the evaluation site in your client application. It's important to understand how these interact.
184113

185114
The default value on the Toggle in Octopus will be returned if the environment being evaluated has not been configured with an explicit value.
186115

@@ -192,4 +121,4 @@ The default value supplied in client code (the `false` argument in the example b
192121

193122
```cs
194123
var darkModeEnabled = await featureClient.GetBooleanValueAsync("dark-mode", false);
195-
```
124+
```
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
layout: src/layouts/Default.astro
3+
pubDate: 2026-04-20
4+
modDate: 2026-04-20
5+
title: OpenFeature Providers
6+
icon: fa-solid fa-code
7+
navTitle: OpenFeature Providers
8+
navSection: Feature Toggles
9+
description: OpenFeature providers for Octopus Feature Toggles
10+
navOrder: 97
11+
---
12+
13+
These are the available Octopus OpenFeature provider SDKs. Getting started instructions for each of these providers is documented in the README files in the repositories.
14+
15+
## Server SDKs
16+
17+
- [.NET](https://github.com/OctopusDeploy/openfeature-provider-dotnet)
18+
- [Java](https://github.com/OctopusDeploy/openfeature-provider-java)
19+
20+
## Web SDKs
21+
22+
- [TypeScript/JavaScript](https://github.com/OctopusDeploy/openfeature-provider-ts-web)
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
layout: src/layouts/Default.astro
3+
pubDate: 2026-04-20
4+
modDate: 2026-04-20
5+
title: Targeting
6+
subtitle: Control rollout within an environment
7+
icon: fa-solid fa-bullseye
8+
navTitle: Targeting
9+
navSection: Feature Toggles
10+
description: Targeting options for Octopus Feature Toggles
11+
navOrder: 96
12+
---
13+
14+
## Tenants {#tenants}
15+
16+
If your Project uses [Tenants](/docs/tenants/), then Toggles may be enabled for subsets of your Tenants.
17+
18+
The options for configuring a Feature Toggle for Tenants are:
19+
20+
- All Tenants
21+
- Specific Tenants Included
22+
- % of Tenants
23+
- Specific Tenants Excluded
24+
25+
For example, the configuration shown below will result in the Toggle evaluating as `On` for 10% of Tenants, always including `Acme` and never including `Cyberdyne Systems`.
26+
27+
![Tenanted Rollout](/docs/img/feature-toggles/tenant-rollout.png)
28+
29+
## Segments {#segments}
30+
31+
Segments allow enabling a toggle for a subset of users.
32+
33+
Segments are key/value pairs, and are supplied by your applications via the [OpenFeature EvaluationContext](https://openfeature.dev/docs/reference/concepts/evaluation-context).
34+
35+
Common segment examples include:
36+
37+
- Specific users. e.g. `user-id/123456`
38+
- Specific accounts. e.g. `account-id/123456`
39+
- License types. e.g. `license-type/free`
40+
- Geographic regions. e.g. `region/eu`
41+
- Rollout rings. e.g. `ring/early-adopter`
42+
43+
The Evaluation Context can be supplied at different points in your application, for example:
44+
45+
- On start-up
46+
- During each web request
47+
- At the evaluation site
48+
49+
The following example shows adding a key/value to the evaluation context in C#.
50+
51+
```cs
52+
// The client would be injected by IoC in many cases
53+
var client = OpenFeature.Api.Instance.GetClient();
54+
// The following is hard-coded, whereas a real-world use would set this dynamically
55+
client.SetContext(EvaluationContext.Builder().Set("license-type", "free").Build());
56+
```
57+
58+
Segments can then be configured for Environments on the Feature Toggle in Octopus.
59+
60+
![Add Segment](/docs/img/feature-toggles/segment-add.png)
61+
62+
A Toggle evaluation will match on segments if the evaluation context matches at least one segment for each key.
63+
64+
Some examples:
65+
66+
| Segments | Evaluation Context | Result |
67+
|-----------------------------------------------|-----------------------------------|--------|
68+
| `user-id/123456` | `user-id/123456` | `On` |
69+
| `user-id/123456` | `user-id/789383` | `Off` |
70+
| `license-type/free` `region/Asia` `region/EU` | `license-type/free` `region/Asia` | `On` |
71+
| `license-type/free` `region/Asia` `region/EU` | `license-type/free` `region/US` | `Off` |

0 commit comments

Comments
 (0)