diff --git a/content/en/feature_flags/guide/server_flag_evaluation_metrics.md b/content/en/feature_flags/guide/server_flag_evaluation_metrics.md
index 9313e83912b..1ef372ac649 100644
--- a/content/en/feature_flags/guide/server_flag_evaluation_metrics.md
+++ b/content/en/feature_flags/guide/server_flag_evaluation_metrics.md
@@ -51,19 +51,79 @@ You only need to enable the protocol your application uses (gRPC on port 4317, o
## Step 2: Configure your application
-Set the following environment variable on your application, in addition to the standard [server-side feature flag configuration][1]:
+Set the following environment variable in addition to the standard [server-side feature flag configuration][1]:
{{< code-block lang="bash" >}}
# Enable flag evaluation metrics
DD_METRICS_OTEL_ENABLED=true
{{< /code-block >}}
+**Note**: The Java tracer does not use `DD_METRICS_OTEL_ENABLED`. Skip this variable and see [Java: Add the OpenTelemetry SDK dependencies](#java-add-the-opentelemetry-sdk-dependencies) instead.
+
+### Java: Add the OpenTelemetry SDK dependencies
+
+The Java provider records `feature_flag.evaluations` through the OpenTelemetry SDK and exports it over OTLP, so the `opentelemetry-sdk-metrics` and `opentelemetry-exporter-otlp` dependencies must be on your application's classpath. Add them alongside your [Java feature flag dependencies][6]. Import the OpenTelemetry BOM so the OpenTelemetry API and SDK stay on the same version:
+
+{{< tabs >}}
+{{% tab "Gradle (Groovy)" %}}
+{{< code-block lang="groovy" filename="build.gradle" >}}
+dependencies {
+ implementation platform('io.opentelemetry:opentelemetry-bom:1.47.0')
+ implementation 'io.opentelemetry:opentelemetry-sdk-metrics'
+ implementation 'io.opentelemetry:opentelemetry-exporter-otlp'
+}
+{{< /code-block >}}
+{{% /tab %}}
+
+{{% tab "Gradle (Kotlin)" %}}
+{{< code-block lang="kotlin" filename="build.gradle.kts" >}}
+dependencies {
+ implementation(platform("io.opentelemetry:opentelemetry-bom:1.47.0"))
+ implementation("io.opentelemetry:opentelemetry-sdk-metrics")
+ implementation("io.opentelemetry:opentelemetry-exporter-otlp")
+}
+{{< /code-block >}}
+{{% /tab %}}
+
+{{% tab "Maven" %}}
+{{< code-block lang="xml" filename="pom.xml" >}}
+
+
+
+ io.opentelemetry
+ opentelemetry-bom
+ 1.47.0
+ pom
+ import
+
+
+
+
+
+ io.opentelemetry
+ opentelemetry-sdk-metrics
+
+
+ io.opentelemetry
+ opentelemetry-exporter-otlp
+
+
+{{< /code-block >}}
+{{% /tab %}}
+{{< /tabs >}}
+
+On the Java tracer, the provider starts its OTLP metrics exporter automatically when the OpenTelemetry SDK is on the classpath. Adding these dependencies enables the metric; `DD_METRICS_OTEL_ENABLED` is not required for Java and setting it alone has no effect. If the dependencies are missing, no metrics are emitted and the tracer logs `OpenTelemetry SDK is not on the classpath`.
+
+
In Spring Boot applications, Spring Boot's OpenTelemetry autoconfiguration also creates an OpenTelemetrySdk bean. If the OpenTelemetry SDK version it resolves does not match the OpenTelemetry API version on the classpath, startup fails with a BeanCreationException for the openTelemetry bean and NoClassDefFoundError: io/opentelemetry/sdk/internal/ScopeConfigurator. Importing the opentelemetry-bom as shown above keeps the API and SDK on the same version and resolves the error.
+
+### Set the OTLP endpoint
+
By default, most tracers send OTLP metrics to the Agent at `DD_AGENT_HOST` on port `4318` (HTTP). If your application already sets `DD_AGENT_HOST` to reach the Agent, no endpoint configuration is required.
Set an OTLP endpoint explicitly in any of these cases:
- The Agent is not reachable at `DD_AGENT_HOST` on the default OTLP port (for example, a remote Agent or a non-default port).
-- You use the **Java** tracer. The Java tracer does not derive the endpoint from `DD_AGENT_HOST`; it defaults to `localhost:4318`. Set the endpoint whenever the Agent is not on `localhost`.
+- You use the **Java** tracer. Its flag evaluation metrics exporter supports OTLP/HTTP only (gRPC is not supported) and uses port `4318`. It does not derive the endpoint from `DD_AGENT_HOST` and defaults to `http://localhost:4318`. Set `OTEL_EXPORTER_OTLP_ENDPOINT` to the Agent's HTTP endpoint when the Agent is not on `localhost`.
- You use the **Python** tracer. The Python tracer defaults to gRPC on port `4317`, not HTTP. Enable the gRPC OTLP receiver on the Agent, or override the protocol to use HTTP instead:
{{< code-block lang="bash" >}}
@@ -151,3 +211,4 @@ The `feature_flag.evaluations` metric is a counter with the following tags:
[3]: https://app.datadoghq.com/metric/explorer
[4]: https://app.datadoghq.com/metric/summary
[5]: /dashboards/
+[6]: /feature_flags/server/java/#installation
diff --git a/content/en/feature_flags/implementation_patterns/opentelemetry.md b/content/en/feature_flags/implementation_patterns/opentelemetry.md
index d6d6fe243e6..4320dc993e7 100644
--- a/content/en/feature_flags/implementation_patterns/opentelemetry.md
+++ b/content/en/feature_flags/implementation_patterns/opentelemetry.md
@@ -115,7 +115,6 @@ For more detail, see [OpenTelemetry API Support for Go](/opentelemetry/instrumen
{{< code-block lang="bash" filename=".env" >}}
DD_TRACE_OTEL_ENABLED=true
DD_EXPERIMENTAL_FLAGGING_PROVIDER_ENABLED=true
-DD_METRICS_OTEL_ENABLED=true
DD_SERVICE=
DD_ENV=
DD_VERSION=
@@ -134,7 +133,7 @@ Client client = api.getClient("my-app");
/* Your existing OpenTelemetry API calls continue to work unchanged */
{{< /code-block >}}
-**Note**: Depend only on the OpenTelemetry API, not the OpenTelemetry SDK. For more detail, see [OpenTelemetry API Support for Java](/opentelemetry/instrument/dd_sdks/api_support/?prog_lang=java&platform=traces).
+**Note**: For tracing, depend only on the OpenTelemetry API, not the OpenTelemetry SDK. For more detail, see [OpenTelemetry API Support for Java](/opentelemetry/instrument/dd_sdks/api_support/?prog_lang=java&platform=traces). To emit flag evaluation metrics, you also need the OpenTelemetry SDK metrics and OTLP exporter dependencies; see [Set Up Server-Side Flag Evaluation Metrics](/feature_flags/guide/server_flag_evaluation_metrics/).
{{% /tab %}}
{{% tab "Node.js" %}}
@@ -347,7 +346,6 @@ func main() {
{{< code-block lang="bash" filename=".env" >}}
DD_APM_TRACING_ENABLED=false
DD_EXPERIMENTAL_FLAGGING_PROVIDER_ENABLED=true
-DD_METRICS_OTEL_ENABLED=true
DD_SERVICE=
DD_ENV=
DD_VERSION=
diff --git a/content/en/feature_flags/server/java.md b/content/en/feature_flags/server/java.md
index a68c3e8ef8e..99f2943117d 100644
--- a/content/en/feature_flags/server/java.md
+++ b/content/en/feature_flags/server/java.md
@@ -32,8 +32,9 @@ The Java SDK integrates feature flags directly into the Datadog Java tracer (`dd
The Datadog Feature Flags SDK for Java requires:
- **Java 11 or higher**
-- **Datadog Java SDK**: Version **1.57.0** or later
-- **OpenFeature SDK**: Version **1.18.2** or later
+- **Datadog Java SDK** (`dd-java-agent`, added with `-javaagent`): Version **1.57.0** or later (**1.62.0** or later for flag evaluation metrics)
+- **Datadog OpenFeature provider** (`com.datadoghq:dd-openfeature`, added as a build dependency): Version **1.57.0** or later (**1.62.0** or later for flag evaluation metrics)
+- **OpenFeature SDK**: Version **1.20.1** or later
- **Datadog Agent**: Version **7.55 or later** with [Remote Configuration][1] enabled
- **Datadog [API key][7]**: Configured on the Agent (not the application) for Remote Configuration
@@ -54,10 +55,10 @@ Add the following dependencies to your `build.gradle`:
{{< code-block lang="groovy" filename="build.gradle" >}}
dependencies {
// OpenFeature SDK for flag evaluation
- implementation 'dev.openfeature:sdk:1.18.2'
+ implementation 'dev.openfeature:sdk:1.20.1'
// Datadog OpenFeature Provider
- implementation 'com.datadoghq:dd-openfeature:1.57.0'
+ implementation 'com.datadoghq:dd-openfeature:1.63.0'
}
{{< /code-block >}}
{{% /tab %}}
@@ -68,10 +69,10 @@ Add the following dependencies to your `build.gradle.kts`:
{{< code-block lang="kotlin" filename="build.gradle.kts" >}}
dependencies {
// OpenFeature SDK for flag evaluation
- implementation("dev.openfeature:sdk:1.18.2")
+ implementation("dev.openfeature:sdk:1.20.1")
// Datadog OpenFeature Provider
- implementation("com.datadoghq:dd-openfeature:1.57.0")
+ implementation("com.datadoghq:dd-openfeature:1.63.0")
}
{{< /code-block >}}
{{% /tab %}}
@@ -85,20 +86,24 @@ Add the following dependencies to your `pom.xml`:
dev.openfeature
sdk
- 1.18.2
+ 1.20.1
com.datadoghq
dd-openfeature
- 1.57.0
+ 1.63.0
{{< /code-block >}}
{{% /tab %}}
{{< /tabs >}}
+The examples above pin `dd-openfeature:1.63.0` and the OpenFeature SDK `1.20.1`. See [Compatibility requirements](#compatibility-requirements) for the minimum supported versions.
+
+To emit flag evaluation metrics (the `feature_flag.evaluations` metric), add the OpenTelemetry SDK dependencies and configure the OTLP endpoint. See [Set Up Server-Side Flag Evaluation Metrics][8].
+
## Configuration
If your Datadog Agent already has Remote Configuration enabled for other features (like Dynamic Instrumentation or Application Security), you can skip the Agent configuration and go directly to [Application configuration](#application-configuration).
@@ -686,3 +691,4 @@ Exposures appear in Datadog only for flags associated with an experiment. Standa
[5]: https://app.datadoghq.com/feature-flags/settings/environments
[6]: /agent/configuration/agent-commands/
[7]: /account_management/api-app-keys/#api-keys
+[8]: /feature_flags/guide/server_flag_evaluation_metrics/
diff --git a/content/en/getting_started/feature_flags/_index.md b/content/en/getting_started/feature_flags/_index.md
index 97ab2d05bff..6d994fda8d1 100644
--- a/content/en/getting_started/feature_flags/_index.md
+++ b/content/en/getting_started/feature_flags/_index.md
@@ -155,10 +155,10 @@ Add the OpenFeature SDK and Datadog OpenFeature provider dependencies:
{{< code-block lang="groovy" filename="build.gradle" >}}
dependencies {
// OpenFeature SDK for flag evaluation
- implementation 'dev.openfeature:sdk:1.18.2'
+ implementation 'dev.openfeature:sdk:1.20.1'
// Datadog OpenFeature Provider
- implementation 'com.datadoghq:dd-openfeature:1.57.0'
+ implementation 'com.datadoghq:dd-openfeature:1.63.0'
}
{{< /code-block >}}
@@ -169,12 +169,11 @@ Enable the provider and start your application with the Java tracer:
# The EXPERIMENTAL_ prefix is historical; the provider is no longer experimental.
export DD_EXPERIMENTAL_FLAGGING_PROVIDER_ENABLED=true
-# Optional: Enable flag evaluation metrics
-export DD_METRICS_OTEL_ENABLED=true
-
java -javaagent:path/to/dd-java-agent.jar -jar your-application.jar
{{< /code-block >}}
+To emit flag evaluation metrics, add the OpenTelemetry SDK dependencies and configure the OTLP endpoint. See [Set Up Server-Side Flag Evaluation Metrics][9].
+
Register the Datadog OpenFeature provider:
{{< code-block lang="java" >}}