mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-25 00:07:47 +01:00
docs: add unleash context and compat table updates
This commit is contained in:
parent
decdc083d0
commit
94f13075ac
@ -50,56 +50,57 @@ If you see an item marked with a ❌ that you would find useful, feel free to re
|
||||
|
||||
|
||||
| Capability | [Java](/sdks/java_sdk) | [Node.js](/sdks/node_sdk) | [Go](/sdks/go_sdk) | [Python](/sdks/python_sdk) | [Ruby](/sdks/ruby_sdk) | [.NET](/sdks/dot_net_sdk) | [PHP](/sdks/php_sdk) | [Rust](https://github.com/unleash/unleash-client-rust) | [Unleash Proxy](unleash-proxy.md) |
|
||||
|---------------------------------------------------------------------------------------------------|:----------------------:|:-------------------------:|:------------------:|:--------------------------:|:----------------------:|:-------------------------:|:--------------------:|:------------------------------------------------------:|:----------------------------------------:|
|
||||
| **Category: Initialization** | | | | | | | | | |
|
||||
| Async initialization | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | N/A |
|
||||
| Can block until synchronized | ✅ | ✅ | ✅ | ⭕ | ⭕ | ✅ | ⭕ | ⭕ | N/A |
|
||||
| Default refresh interval | 10s | 15s | 15s | 15s | 15s | 30s | 30s | 15s | 5s |
|
||||
| Default metrics interval | 60s | 60s | 60s | 60s | 60s | 60s | 30s | 15s | 30s |
|
||||
| Context provider | ✅ | N/A | N/A | N/A | N/A | ✅ | ✅ | N/A | N/A |
|
||||
| Global fallback function | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | N/A |
|
||||
| Toggle Query: `namePrefix` | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | |
|
||||
| Toggle Query: `tags` | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | |
|
||||
| Toggle Query: `project_name` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | N/A | ⭕ | |
|
||||
| **Category: Custom Headers** | | | | | | | | | |
|
||||
| static | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ⭕ | N/A |
|
||||
| function | ✅ | ✅ | ⭕ | ✅ | ⭕ | ✅ | ⭕ | ⭕ | N/A |
|
||||
| **Category: Built-in strategies** | | | | | | | | | |
|
||||
| [Standard](../user_guide/activation_strategy#standard) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
|
||||
| [Gradual rollout](../user_guide/activation_strategy#gradual-rollout) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
|
||||
| [Gradual rollout: custom stickiness](../user_guide/activation_strategy#customize-stickiness-beta) | ✅ | ✅ | ⭕ | ✅ | ✅ | ✅ | ✅ | ⭕ | |
|
||||
| [UserID](../user_guide/activation_strategy#userids) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
|
||||
| [IP](../user_guide/activation_strategy#ips) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
|
||||
| [IP](../user_guide/activation_strategy#ips): CIDR syntax | ✅ | ✅ | ✅ | ✅ | ✅ | ⭕ | ⭕ | ✅ | |
|
||||
| [Hostname](../user_guide/activation_strategy#hostnames) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
|
||||
| **Category: [Custom strategies](../advanced/custom_activation_strategy)** | | | | | | | | | |
|
||||
| Basic support | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
|
||||
| **Category: [Strategy constraints](../advanced/strategy_constraints)** | | | | | | | | | |
|
||||
| Basic support (`IN`, `NOT_IN` operators) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
|
||||
| Advanced support (Semver, date, numeric and extended string operators) | ✅ | ✅ | ⭕ | ⭕ | ⭕ | ⭕ | ✅ | ⭕ | |
|
||||
| **Category: [Unleash Context](../user_guide/unleash_context)** | | | | | | | | | |
|
||||
| Static fields (`environment`, `appName`) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
|
||||
| Defined fields | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
|
||||
| Custom properties | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
|
||||
| **Category: [`isEnabled`](../client-specification#implementation-of-isenabled)** | | | | | | | | | |
|
||||
| Can take context | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
|
||||
| Override fallback value | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
|
||||
| Fallback function | ✅ | ✅ | ✅ | ✅ | ✅ | ⭕ | ⭕ | ⭕ | |
|
||||
| **Category: [Variants](../advanced/toggle_variants)** | | | | | | | | | |
|
||||
| Basic support | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
|
||||
| Custom fallback variant | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ⭕ | |
|
||||
| Custom weight | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ⭕ | |
|
||||
| [Custom stickiness (beta)](../advanced/stickiness#custom-stickiness-beta) | ✅ | ✅ | ⭕ | ✅ | ✅ | ✅ | ✅ | ⭕ | |
|
||||
| **Category: Local backup** | | | | | | | | | |
|
||||
| File based backup | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ⭕ | |
|
||||
| **Category: Usage metrics** | | | | | | | | | |
|
||||
| Can disable metrics | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
|
||||
| Client registration | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
|
||||
| Basic usage metrics (yes/no) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
|
||||
| [Impression data](../advanced/impression-data.md) | ⭕ | ⭕ | ⭕ | ⭕ | ⭕ | ⭕ | ⭕ | ⭕ | N/A |
|
||||
| **Category: Bootstrap (beta)** | | | | | | | | | |
|
||||
| Bootstrap from file | ✅ | ✅ | ⭕ | ⭕ | ✅ | ⭕ | ⭕ | ⭕ | ✅ |
|
||||
| Custom Bootstrap implementation | ✅ | ✅ | ⭕ | ⭕ | ✅ | ⭕ | ⭕ | ⭕ | ✅ |
|
||||
|---------------------------------------------------------------------------------------------------|:----------------------:|:-------------------------:|:------------------:|:--------------------------:|:----------------------:|:-------------------------:|:--------------------:|:------------------------------------------------------:|:---------------------------------:|
|
||||
| **Category: Initialization** | | | | | | | | | |
|
||||
| Async initialization | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | N/A |
|
||||
| Can block until synchronized | ✅ | ✅ | ✅ | ⭕ | ⭕ | ✅ | ⭕ | ⭕ | N/A |
|
||||
| Default refresh interval | 10s | 15s | 15s | 15s | 15s | 30s | 30s | 15s | 5s |
|
||||
| Default metrics interval | 60s | 60s | 60s | 60s | 60s | 60s | 30s | 15s | 30s |
|
||||
| Context provider | ✅ | N/A | N/A | N/A | N/A | ✅ | ✅ | N/A | N/A |
|
||||
| Global fallback function | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | N/A |
|
||||
| Toggle Query: `namePrefix` | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | |
|
||||
| Toggle Query: `tags` | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ | ❌ | ❌ | |
|
||||
| Toggle Query: `project_name` | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | N/A | ⭕ | |
|
||||
| **Category: Custom Headers** | | | | | | | | | |
|
||||
| static | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ⭕ | N/A |
|
||||
| function | ✅ | ✅ | ⭕ | ✅ | ⭕ | ✅ | ⭕ | ⭕ | N/A |
|
||||
| **Category: Built-in strategies** | | | | | | | | | |
|
||||
| [Standard](../user_guide/activation_strategy#standard) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
|
||||
| [Gradual rollout](../user_guide/activation_strategy#gradual-rollout) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
|
||||
| [Gradual rollout: custom stickiness](../user_guide/activation_strategy#customize-stickiness-beta) | ✅ | ✅ | ⭕ | ✅ | ✅ | ✅ | ✅ | ⭕ | |
|
||||
| [UserID](../user_guide/activation_strategy#userids) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
|
||||
| [IP](../user_guide/activation_strategy#ips) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
|
||||
| [IP](../user_guide/activation_strategy#ips): CIDR syntax | ✅ | ✅ | ✅ | ✅ | ✅ | ⭕ | ⭕ | ✅ | |
|
||||
| [Hostname](../user_guide/activation_strategy#hostnames) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
|
||||
| **Category: [Custom strategies](../advanced/custom_activation_strategy)** | | | | | | | | | |
|
||||
| Basic support | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
|
||||
| **Category: [Strategy constraints](../advanced/strategy_constraints)** | | | | | | | | | |
|
||||
| Basic support (`IN`, `NOT_IN` operators) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
|
||||
| Advanced support (Semver, date, numeric and extended string operators) | ✅ | ✅ | ⭕ | ⭕ | ⭕ | ⭕ | ✅ | ⭕ | |
|
||||
| **Category: [Unleash Context](../user_guide/unleash_context)** | | | | | | | | | |
|
||||
| Static fields (`environment`, `appName`) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
|
||||
| Defined fields | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
|
||||
| Custom properties | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
|
||||
|<span id="current-time-server">`currentTime` context field</span> | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
|
||||
| **Category: [`isEnabled`](../client-specification#implementation-of-isenabled)** | | | | | | | | | |
|
||||
| Can take context | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
|
||||
| Override fallback value | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
|
||||
| Fallback function | ✅ | ✅ | ✅ | ✅ | ✅ | ⭕ | ⭕ | ⭕ | |
|
||||
| **Category: [Variants](../advanced/toggle_variants)** | | | | | | | | | |
|
||||
| Basic support | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
|
||||
| Custom fallback variant | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ⭕ | |
|
||||
| Custom weight | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ⭕ | |
|
||||
| [Custom stickiness (beta)](../advanced/stickiness#custom-stickiness-beta) | ✅ | ✅ | ⭕ | ✅ | ✅ | ✅ | ✅ | ⭕ | |
|
||||
| **Category: Local backup** | | | | | | | | | |
|
||||
| File based backup | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ⭕ | |
|
||||
| **Category: Usage metrics** | | | | | | | | | |
|
||||
| Can disable metrics | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
|
||||
| Client registration | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
|
||||
| Basic usage metrics (yes/no) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ | |
|
||||
| [Impression data](../advanced/impression-data.md) | ⭕ | ⭕ | ⭕ | ⭕ | ⭕ | ⭕ | ⭕ | ⭕ | N/A |
|
||||
| **Category: Bootstrap (beta)** | | | | | | | | | |
|
||||
| Bootstrap from file | ✅ | ✅ | ⭕ | ⭕ | ✅ | ⭕ | ⭕ | ⭕ | ✅ |
|
||||
| Custom Bootstrap implementation | ✅ | ✅ | ⭕ | ⭕ | ✅ | ⭕ | ⭕ | ⭕ | ✅ |
|
||||
|
||||
## Community SDKs ❤️ {#community-sdks}
|
||||
|
||||
|
@ -17,14 +17,15 @@ _All fields are optional_, but some strategies depend on certain fields being pr
|
||||
|
||||
The below table gives a brief overview over what the fields' intended usage is, their lifetime, and their type. Note that the exact type can vary between programming languages and implementations. Be sure to consult your specific client SDK for more information on its implementation of the Unleash Context.
|
||||
|
||||
| field name | type | lifetime | description |
|
||||
|-------------------|-----------------------|----------|----------------------------------------|
|
||||
| `appName` | `string` | static | the name of the application |
|
||||
| `environment`[^1] | `string` | static | the environment the app is running in |
|
||||
| `userId` | `string` | dynamic | an identifier for the current user |
|
||||
| `sessionId` | `string` | dynamic | an identifier for the current session |
|
||||
| `remoteAddress` | `string` | dynamic | an identifier for the current session |
|
||||
| `properties` | `Map<string, string>` | dynamic | a key-value store of any data you want |
|
||||
| field name | type | lifetime | description | introduced in |
|
||||
|-------------------|-----------------------|----------|--------------------------------------------------------------------------------------------|---------------|
|
||||
| `appName` | `string` | static | the name of the application | |
|
||||
| `environment`[^1] | `string` | static | the environment the app is running in | |
|
||||
| `userId` | `string` | dynamic | an identifier for the current user | |
|
||||
| `sessionId` | `string` | dynamic | an identifier for the current session | |
|
||||
| `remoteAddress` | `string` | dynamic | an identifier for the current session | |
|
||||
| `properties` | `Map<string, string>` | dynamic | a key-value store of any data you want | |
|
||||
| `currentTime`[^2] | `DateTime`/`string` | special / read-only | A `DateTime` (or similar) data class instance or a string in an RFC3339-compatible format. | v4.9 |
|
||||
|
||||
|
||||
### The `properties` field
|
||||
@ -76,3 +77,5 @@ Any context field _can_ be used to [calculate custom stickiness](../advanced/sti
|
||||
|
||||
|
||||
[^1]: If you're on Unleash 4.3 or higher, you'll probably want to use [the environments feature](../user_guide/environments.md) instead of relying on the `environment` context field when working with environments.
|
||||
|
||||
[^2]: Check the [compatibility table](../sdks/index.md#current-time-server) for an overview of which SDKs provide the `currentTime` property.
|
||||
|
Loading…
Reference in New Issue
Block a user