diff --git a/config/_default/menus/main.en.yaml b/config/_default/menus/main.en.yaml
index 05d75fb4375..bcd9021b8fd 100644
--- a/config/_default/menus/main.en.yaml
+++ b/config/_default/menus/main.en.yaml
@@ -5855,6 +5855,11 @@ menu:
parent: feature_flags_client
identifier: feature_flags_client_react_native
weight: 106
+ - name: Unity
+ url: feature_flags/client/unity
+ parent: feature_flags_client
+ identifier: feature_flags_client_unity
+ weight: 107
- name: Server SDKs
url: feature_flags/server
parent: feature_flags
diff --git a/content/en/feature_flags/client/unity.md b/content/en/feature_flags/client/unity.md
new file mode 100644
index 00000000000..7d8a50613c5
--- /dev/null
+++ b/content/en/feature_flags/client/unity.md
@@ -0,0 +1,235 @@
+---
+title: Unity Feature Flags
+description: Set up Datadog Feature Flags for Unity applications.
+further_reading:
+- link: "/feature_flags/client/"
+ tag: "Documentation"
+ text: "Client-Side Feature Flags"
+- link: "/real_user_monitoring/application_monitoring/unity/"
+ tag: "Documentation"
+ text: "Unity Monitoring"
+- link: "https://github.com/DataDog/dd-sdk-unity"
+ tag: "Source Code"
+ text: "dd-sdk-unity source code"
+---
+
+## Overview
+
+This page describes how to instrument your Unity application with the Datadog Feature Flags SDK. Datadog feature flags provide a unified way to remotely control feature availability in your app, experiment safely, and deliver new experiences with confidence.
+
+This guide explains how to install and enable the SDK, create and use a `FlagsClient`, and configure advanced options.
+
+## Installation
+
+Declare the Datadog Unity SDK as a dependency in your project. The Datadog Unity SDK includes feature flags support.
+
+1. Install the [External Dependency Manager for Unity (EDM4U)][1]. This can be done using [Open UPM][2].
+
+2. Add the [Datadog SDK Unity package][3] using its Git URL `https://github.com/DataDog/unity-package.git`.
+
+3. (Android only) Configure your project to use [Gradle templates][4], and enable both `Custom Main Template` and `Custom Gradle Properties Template`.
+
+4. (Android only) If you build and receive `Duplicate class` errors (common in Unity 2022.x), add the following code to the `dependencies` block of your `mainTemplate.gradle`:
+
+ ```groovy
+ constraints {
+ implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.0") {
+ because("kotlin-stdlib-jdk8 is now a part of kotlin-stdlib")
+ }
+ }
+ ```
+
+## Initialize the SDK
+
+Initialize Datadog as early as possible in your app lifecycle. Navigate to your `Project Settings` and click on the `Datadog` section to configure your client token, environment, and other settings.
+
+For more information about setting up the Unity SDK, see [Unity Monitoring Setup][5].
+
+## Enable flags
+
+After initializing Datadog, enable `Flags` to attach it to the current Datadog SDK instance and prepare for client creation and flag evaluation:
+
+{{< code-block lang="csharp" >}}
+using Datadog.Unity.Flags;
+
+DdFlags.Enable();
+{{< /code-block >}}
+
+You can also pass a configuration object; see [Advanced configuration](#advanced-configuration).
+
+## Create and retrieve a client
+
+Create a client once, typically during app startup:
+
+{{< code-block lang="csharp" >}}
+var client = DdFlags.Instance.CreateClient();
+{{< /code-block >}}
+
+You can also create multiple clients by providing the `name` parameter:
+
+{{< code-block lang="csharp" >}}
+var checkoutClient = DdFlags.Instance.CreateClient("checkout");
+{{< /code-block >}}
+
+
If a client with the given name already exists, the existing instance is reused.
+
+## Set the evaluation context
+
+Define who or what the flag evaluation applies to using a `FlagsEvaluationContext`. The evaluation context includes user or session information used to determine which flag variations should be returned. Call this method before evaluating flags to help ensure proper targeting.
+
+{{< code-block lang="csharp" >}}
+client.SetEvaluationContext(
+ new FlagsEvaluationContext(
+ targetingKey: "user-123",
+ attributes: new Dictionary
+ {
+ { "email", "user@example.com" },
+ { "tier", "premium" },
+ }
+ ),
+ onComplete: success =>
+ {
+ if (success)
+ {
+ // Flags are ready β begin evaluating
+ }
+ else
+ {
+ // Fetch failed β evaluations return default values
+ }
+ }
+);
+{{< /code-block >}}
+
+This method fetches flag assignments from the server asynchronously in the background. The operation is non-blocking and thread-safe. Flag updates are available for subsequent evaluations after the background operation completes.
+
+## Evaluate flags
+
+After creating the `FlagsClient` and setting its evaluation context, you can start reading flag values throughout your app. Flag evaluation is _local and instantaneous_βthe SDK uses locally cached data, so no network requests occur when evaluating flags. This makes evaluations safe to perform on the main thread.
+
+Each flag is identified by a _key_ (a unique string) and can be evaluated with a _typed getter_ that returns a value of the expected type. If the flag doesn't exist or cannot be evaluated, the SDK returns the provided default value.
+
+### Boolean flags
+
+Use `GetBooleanValue(key, defaultValue)` for flags that represent on/off or true/false conditions. For example:
+
+{{< code-block lang="csharp" >}}
+var isNewCheckoutEnabled = client.GetBooleanValue("checkout.new", false);
+
+if (isNewCheckoutEnabled)
+{
+ ShowNewCheckoutFlow();
+}
+else
+{
+ ShowLegacyCheckout();
+}
+{{< /code-block >}}
+
+### String flags
+
+Use `GetStringValue(key, defaultValue)` for flags that select between multiple variants or configuration strings. For example:
+
+{{< code-block lang="csharp" >}}
+var theme = client.GetStringValue("ui.theme", "light");
+
+switch (theme)
+{
+ case "light": SetLightTheme(); break;
+ case "dark": SetDarkTheme(); break;
+ default: SetLightTheme(); break;
+}
+{{< /code-block >}}
+
+### Integer and double flags
+
+For numeric flags, use `GetIntegerValue(key, defaultValue)` or `GetDoubleValue(key, defaultValue)`. These are appropriate when a feature depends on a numeric parameter such as a limit, percentage, or multiplier:
+
+{{< code-block lang="csharp" >}}
+var maxItems = client.GetIntegerValue("cart.items.max", 20);
+
+var priceMultiplier = client.GetDoubleValue("pricing.multiplier", 1.0);
+{{< /code-block >}}
+
+### Object flags
+
+For structured or JSON-like data, use `GetObjectValue(key, defaultValue)`. This method returns an `object`, which can be cast to the appropriate type. Object flags are useful for remote configuration scenarios where multiple properties need to be provided together. For example:
+
+{{< code-block lang="csharp" >}}
+var config = client.GetObjectValue(
+ "ui.config",
+ new Dictionary
+ {
+ { "color", "#00A3FF" },
+ { "fontSize", 14 },
+ }
+);
+
+if (config is Dictionary configDict)
+{
+ var color = configDict["color"] as string;
+ var fontSize = (int)configDict["fontSize"];
+}
+{{< /code-block >}}
+
+### Flag evaluation details
+
+When you need more than just the flag value, use the `GetDetails` methods. These methods return both the evaluated value and metadata explaining the evaluation:
+
+* `GetBooleanDetails(key, defaultValue)` -> `FlagDetails`
+* `GetStringDetails(key, defaultValue)` -> `FlagDetails`
+* `GetIntegerDetails(key, defaultValue)` -> `FlagDetails`
+* `GetDoubleDetails(key, defaultValue)` -> `FlagDetails`
+
+For example:
+
+{{< code-block lang="csharp" >}}
+var details = client.GetStringDetails("paywall.layout", "control");
+
+Debug.Log($"Value: {details.Value}"); // Evaluated value (for example: "A", "B", or "control")
+Debug.Log($"Variant: {details.Variant}"); // Variant name, if applicable
+Debug.Log($"Reason: {details.Reason}"); // Why this value was chosen (for example: "TARGETING_MATCH" or "DEFAULT")
+Debug.Log($"Error: {details.Error?.ToString()}"); // The error that occurred during evaluation, if any
+{{< /code-block >}}
+
+Flag details may help you debug evaluation behavior and understand why a user received a given value.
+
+## Advanced configuration
+
+The `DdFlags.Enable()` API accepts optional configuration with options listed below.
+
+{{< code-block lang="csharp" >}}
+DdFlags.Enable(new FlagsConfiguration(
+ trackExposures: true,
+ trackEvaluations: true,
+ evaluationFlushIntervalSeconds: 10.0f
+));
+{{< /code-block >}}
+
+`trackExposures`
+: When `true` (default), the SDK automatically records an _exposure event_ when a flag is evaluated. These events contain metadata about which flag was accessed, which variant was served, and under what context. They are sent to Datadog so you can later analyze feature adoption. Set to `false` to disable exposure tracking.
+
+`trackEvaluations`
+: When `true` (default), the SDK tracks flag evaluations and sends aggregated evaluation telemetry to Datadog. This enables analytics about flag usage patterns and performance. Set to `false` to disable evaluation tracking.
+
+`evaluationFlushIntervalSeconds`
+: The interval in seconds at which batched evaluation events are sent to Datadog. Accepted values are between `1` and `60`. Default is `10.0` seconds.
+
+`customFlagsEndpoint`
+: Configures a custom server URL for retrieving flag assignments.
+
+`customExposureEndpoint`
+: Configures a custom server URL for sending flags exposure data.
+
+`customEvaluationEndpoint`
+: Configures a custom server URL for sending flags evaluation telemetry.
+
+## Further reading
+
+{{< partial name="whats-next/whats-next.html" >}}
+
+[1]: https://github.com/googlesamples/unity-jar-resolver
+[2]: https://openupm.com/packages/com.google.external-dependency-manager/
+[3]: https://github.com/DataDog/unity-package
+[4]: https://docs.unity3d.com/Manual/gradle-templates.html
+[5]: /real_user_monitoring/application_monitoring/unity/setup
diff --git a/content/en/feature_flags/server/java.md b/content/en/feature_flags/server/java.md
index e0e2ab5539e..481547cf689 100644
--- a/content/en/feature_flags/server/java.md
+++ b/content/en/feature_flags/server/java.md
@@ -24,7 +24,7 @@ The Java SDK integrates feature flags directly into the Datadog APM tracer and i
The Datadog Feature Flags SDK for Java requires:
- **Java 11 or higher**
-- **Datadog Java APM Tracer**: Version **1.57.0** or later
+- **Datadog Java APM Tracer**: Version **1.61.0** or later
- **OpenFeature SDK**: Version **1.18.2** or later
- **Datadog Agent**: Version **7.x or later** with [Remote Configuration][1] enabled
- **Datadog API Key**: Required for Remote Configuration
@@ -49,7 +49,7 @@ dependencies {
implementation 'dev.openfeature:sdk:1.18.2'
// Datadog OpenFeature Provider
- implementation 'com.datadoghq:dd-openfeature:1.57.0'
+ implementation 'com.datadoghq:dd-openfeature:1.61.0'
}
{{< /code-block >}}
{{% /tab %}}
@@ -63,7 +63,7 @@ dependencies {
implementation("dev.openfeature:sdk:1.18.2")
// Datadog OpenFeature Provider
- implementation("com.datadoghq:dd-openfeature:1.57.0")
+ implementation("com.datadoghq:dd-openfeature:1.61.0")
}
{{< /code-block >}}
{{% /tab %}}
@@ -84,7 +84,7 @@ Add the following dependencies to your `pom.xml`:
com.datadoghq
dd-openfeature
- 1.57.0
+ 1.61.0
{{< /code-block >}}
@@ -207,7 +207,7 @@ public class App {
}
{{< /code-block >}}
-Use `setProviderAndWait()` to block evaluation until the initial flag configuration is received from Remote Configuration. This ensures flags are ready before the application starts serving traffic. The default timeout is 30 seconds.
+Use `setProviderAndWait()` to block evaluation until the initial flag configuration is received from Remote Configuration. This helps ensure flags are ready before the application starts serving traffic. The default timeout is 30 seconds.
`ProviderNotReadyError` is an OpenFeature SDK exception thrown when the provider times out during initialization. Catching it allows the application to start with default flag values if Remote Configuration is unavailable. If not caught, the exception propagates and may prevent application startup. Handle this based on your availability requirements.
@@ -323,6 +323,89 @@ if (config.isStructure()) {
{{% /tab %}}
{{< /tabs >}}
+## Evaluation metrics
+
+The Datadog OpenFeature Provider records a `feature_flag.evaluations` OTel counter metric on every flag evaluation. Use this metric to track how often flags are evaluated, which variants are served, and evaluation reasons across your application.
+
+Evaluation metrics are available from `dd-openfeature` version 1.61.0.
+
+### Add the required dependencies
+
+Evaluation metrics require the OpenTelemetry SDK on the application classpath. These dependencies are optional β the provider operates without them, but no evaluation metrics are emitted.
+
+{{< tabs >}}
+{{% tab "Gradle (Groovy)" %}}
+Add the following dependencies to your `build.gradle`:
+
+{{< code-block lang="groovy" filename="build.gradle" >}}
+dependencies {
+ implementation 'io.opentelemetry:opentelemetry-sdk-metrics:1.47.0'
+ implementation 'io.opentelemetry:opentelemetry-exporter-otlp:1.47.0'
+}
+{{< /code-block >}}
+{{% /tab %}}
+
+{{% tab "Gradle (Kotlin)" %}}
+Add the following dependencies to your `build.gradle.kts`:
+
+{{< code-block lang="kotlin" filename="build.gradle.kts" >}}
+dependencies {
+ implementation("io.opentelemetry:opentelemetry-sdk-metrics:1.47.0")
+ implementation("io.opentelemetry:opentelemetry-exporter-otlp:1.47.0")
+}
+{{< /code-block >}}
+{{% /tab %}}
+
+{{% tab "Maven" %}}
+Add the following dependencies to your `pom.xml`:
+
+{{< code-block lang="xml" filename="pom.xml" >}}
+
+
+ io.opentelemetry
+ opentelemetry-sdk-metrics
+ 1.47.0
+
+
+ io.opentelemetry
+ opentelemetry-exporter-otlp
+ 1.47.0
+
+
+{{< /code-block >}}
+{{% /tab %}}
+{{< /tabs >}}
+
+Any OpenTelemetry API 1.x version is compatible. The `opentelemetry-api` artifact is included as a transitive dependency of `dd-openfeature`.
+
+### Configure the OTLP endpoint
+
+Metrics are exported to the Datadog Agent's OTLP receiver through OTLP HTTP/protobuf. The endpoint is resolved in the following order:
+
+| Priority | Environment variable | Behavior |
+|---|---|---|
+| 1 | `OTEL_EXPORTER_OTLP_METRICS_ENDPOINT` | Used as-is (must include the full path, for example, `http://agent:4318/v1/metrics`) |
+| 2 | `OTEL_EXPORTER_OTLP_ENDPOINT` | Base URL; `/v1/metrics` is appended automatically |
+| 3 | (none set) | Defaults to `http://localhost:4318/v1/metrics` |
+
+The Datadog Agent must have its OTLP receiver enabled on port 4318.
+
+### Metric reference
+
+**Metric name:** `feature_flag.evaluations`
+**Type:** Monotonic counter (cumulative temporality)
+**Export interval:** Every 10 seconds
+
+| Attribute | When present | Description | Example |
+|---|---|---|---|
+| `feature_flag.key` | Always | Flag key | `my-feature` |
+| `feature_flag.result.variant` | Always | Resolved variant key (empty string if null) | `on`, `variant-a` |
+| `feature_flag.result.reason` | Always | Evaluation reason (lowercased) | `targeting_match`, `static`, `split`, `error`, `disabled`, `default` |
+| `error.type` | On error only | Error code (lowercased) | `flag_not_found`, `type_mismatch`, `provider_not_ready` |
+| `feature_flag.result.allocation_key` | When allocation matched | Allocation key from flag config | `default-allocation` |
+
+If the OTel SDK dependencies are absent from the classpath, the provider logs a warning at startup and continues without emitting metrics. Flag evaluation is not affected.
+
## Error handling
The OpenFeature SDK uses a default value pattern. If evaluation fails for any reason, the default value you provide is returned.
@@ -422,7 +505,7 @@ The `Provider` instance is shared globally. Client names are for organizational
## Best practices
### Initialize early
-Initialize the OpenFeature provider as early as possible in your application lifecycle (for example, in `main()` or application startup). This ensures flags are ready before business logic executes.
+Initialize the OpenFeature provider as early as possible in your application lifecycle (for example, in `main()` or application startup). This helps ensure flags are ready before business logic executes.
### Use meaningful default values
Always provide sensible default values that maintain safe behavior if flag evaluation fails:
diff --git a/layouts/partials/feature_flags/feature_flags_client.html b/layouts/partials/feature_flags/feature_flags_client.html
index 3d61897bc3c..d9001cb2bb9 100644
--- a/layouts/partials/feature_flags/feature_flags_client.html
+++ b/layouts/partials/feature_flags/feature_flags_client.html
@@ -65,6 +65,13 @@
+