Skip to content

Commit 61e32ba

Browse files
aarsilvclaude
andcommitted
[FFL-2653] Address second round of PR review comments
- Note the Datadog Java tracer 1.62.0+ requirement (not just the provider) - Clarify that examples use the current release 1.63.0 - Lead the env-var step with "all tracers except Java"; tighten wording - Use direct voice and tighten the Java OTLP endpoint bullet Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent ddc23e6 commit 61e32ba

2 files changed

Lines changed: 7 additions & 5 deletions

File tree

content/en/feature_flags/guide/server_flag_evaluation_metrics.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ You only need to enable the protocol your application uses (gRPC on port 4317, o
5151

5252
## Step 2: Configure your application
5353

54-
Set the following environment variable on non-Java tracers, in addition to the standard [server-side feature flag configuration][1]. The Java tracer enables flag evaluation metrics through the OpenTelemetry SDK dependencies described in the [next section](#java-add-the-opentelemetry-sdk-dependencies), not through this variable.
54+
For all tracers except Java, set the following environment variable in addition to the standard [server-side feature flag configuration][1]. The Java tracer enables flag evaluation metrics through the OpenTelemetry SDK dependencies described in the [next section](#java-add-the-opentelemetry-sdk-dependencies).
5555

5656
{{< code-block lang="bash" >}}
5757
# Enable flag evaluation metrics
@@ -60,7 +60,7 @@ DD_METRICS_OTEL_ENABLED=true
6060

6161
### Java: add the OpenTelemetry SDK dependencies
6262

63-
The Java provider records `feature_flag.evaluations` through the OpenTelemetry SDK and exports it over OTLP, so the OpenTelemetry SDK metrics and OTLP exporter must be on your application's classpath. Add them alongside your [feature flag dependencies][6]. Import the OpenTelemetry BOM so the OpenTelemetry API and SDK stay on the same version:
63+
The Java provider records `feature_flag.evaluations` through the OpenTelemetry SDK and exports it over OTLP, so the OpenTelemetry SDK metrics and OTLP exporter 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:
6464

6565
{{< tabs >}}
6666
{{% tab "Gradle (Groovy)" %}}
@@ -110,7 +110,7 @@ dependencies {
110110
{{% /tab %}}
111111
{{< /tabs >}}
112112

113-
On the Java tracer, the provider starts its OTLP metrics exporter automatically when the OpenTelemetry SDK is on the classpath, so adding these dependencies is what enables the metric; setting `DD_METRICS_OTEL_ENABLED` alone does not. This requires the Datadog Java tracer 1.62.0 or later. If the dependencies are missing, no metrics are emitted and the tracer logs `OpenTelemetry SDK is not on the classpath`.
113+
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; setting `DD_METRICS_OTEL_ENABLED` alone does not. This requires the Datadog Java tracer 1.62.0 or later. If the dependencies are missing, no metrics are emitted and the tracer logs `OpenTelemetry SDK is not on the classpath`.
114114

115115
<div class="alert alert-info">In Spring Boot applications, Spring Boot's OpenTelemetry autoconfiguration also creates an <code>OpenTelemetrySdk</code> bean. If the OpenTelemetry SDK version it resolves does not match the OpenTelemetry API version on the classpath, startup fails with a <code>BeanCreationException</code> for the <code>openTelemetry</code> bean and <code>NoClassDefFoundError: io/opentelemetry/sdk/internal/ScopeConfigurator</code>. Importing the <code>opentelemetry-bom</code> as shown above keeps the API and SDK on the same version and resolves the error.</div>
116116

@@ -121,7 +121,7 @@ By default, most tracers send OTLP metrics to the Agent at `DD_AGENT_HOST` on po
121121
Set an OTLP endpoint explicitly in any of these cases:
122122

123123
- The Agent is not reachable at `DD_AGENT_HOST` on the default OTLP port (for example, a remote Agent or a non-default port).
124-
- You use the **Java** tracer. The Java flag evaluation metrics exporter sends OTLP over HTTP on port `4318` and ignores `OTEL_EXPORTER_OTLP_PROTOCOL`, so gRPC is not supported. It does not derive the endpoint from `DD_AGENT_HOST`; it defaults to `http://localhost:4318`. Set `OTEL_EXPORTER_OTLP_ENDPOINT` to the Agent's HTTP endpoint whenever the Agent is not on `localhost`.
124+
- You use the **Java** tracer. Its flag evaluation metrics exporter uses OTLP/HTTP on port `4318` only (gRPC is not supported) and does not derive the endpoint from `DD_AGENT_HOST` (it defaults to `http://localhost:4318`). Set `OTEL_EXPORTER_OTLP_ENDPOINT` to the Agent's HTTP endpoint when the Agent is not on `localhost`.
125125
- 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:
126126

127127
{{< code-block lang="bash" >}}

content/en/feature_flags/server/java.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,9 @@ Add the following dependencies to your `pom.xml`:
100100
{{% /tab %}}
101101
{{< /tabs >}}
102102

103-
To emit flag evaluation metrics (the `feature_flag.evaluations` metric), use `dd-openfeature` 1.62.0 or later and add the OpenTelemetry SDK dependencies to your application. For the required dependencies and endpoint configuration, see [Set Up Server-Side Flag Evaluation Metrics](/feature_flags/guide/server_flag_evaluation_metrics/).
103+
The examples use the current release, `1.63.0`. See [Compatibility requirements](#compatibility-requirements) for the minimum supported versions.
104+
105+
To emit flag evaluation metrics (the `feature_flag.evaluations` metric), use `dd-openfeature` and the Datadog Java tracer 1.62.0 or later, and add the OpenTelemetry SDK dependencies to your application. For the required dependencies and endpoint configuration, see [Set Up Server-Side Flag Evaluation Metrics](/feature_flags/guide/server_flag_evaluation_metrics/).
104106

105107
## Configuration
106108

0 commit comments

Comments
 (0)