Skip to content

Commit f80bc23

Browse files
committed
include label with percentage values (via expressions)
1 parent 78ffa75 commit f80bc23

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

packages/web/docs/src/content/router/configuration/override_labels.mdx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,14 @@ Within the `expression`, you have access to the following context:
100100

101101
```yaml
102102
override_labels:
103-
activate_beta_feature:
103+
# This label will be active for 5% of the traffic
104+
use-fulfillment-service:
105+
expession: 'random_float(0.0, 100.0) < 5.0'
106+
107+
activate-beta-feature:
104108
expression: '.request.headers."x-user-group" == "beta"'
105109
```
106110

107-
This configuration activates the `activate_beta_feature` label only for requests that include the
108-
header `x-user-group: beta`.
111+
This configuration activates the `activate-beta-feature` label only for requests that include the
112+
header `x-user-group: beta`. The `use-fulfillment-service` label is activated for approximately 5%
113+
of all requests, enabling a canary release pattern.

0 commit comments

Comments
 (0)