Skip to content

Use agent OTel metrics for OpenFeature evaluations#11745

Draft
sameerank wants to merge 1 commit into
masterfrom
sameerank/openfeature-otel-metrics-pipeline
Draft

Use agent OTel metrics for OpenFeature evaluations#11745
sameerank wants to merge 1 commit into
masterfrom
sameerank/openfeature-otel-metrics-pipeline

Conversation

@sameerank

Copy link
Copy Markdown
Contributor

What changed

This updates the OpenFeature feature flag evaluation metrics implementation to record through GlobalOpenTelemetry instead of constructing its own OpenTelemetry SDK meter provider and OTLP HTTP exporter.

It also removes the OpenTelemetry SDK/exporter dependencies from feature-flagging-api, refreshes the lockfile, and updates the README to document that evaluation metrics use the Datadog Java agent OpenTelemetry metrics pipeline with DD_METRICS_OTEL_ENABLED=true.

Why

The previous implementation required opentelemetry-sdk-metrics and opentelemetry-exporter-otlp on the application classpath and always created an OTLP HTTP exporter. That did not line up with customers already using the Datadog Java agent OTel metrics pipeline for custom metrics, especially when their Agent OTLP receiver is configured for gRPC only.

With this change, feature_flag.evaluations uses the same configured Java agent OTel metrics pipeline as other custom OTel metrics.

Validation

  • ./gradlew :products:feature-flagging:feature-flagging-api:dependencies --write-locks
  • ./gradlew :products:feature-flagging:feature-flagging-api:test
  • git diff --check
  • git diff --cached --check

Noted local blockers/noisy checks:

  • ./gradlew :products:feature-flagging:feature-flagging-api:spotlessCheck is currently blocked by :spotlessInternalRegisterDependencies failing to provision P2 dependencies.
  • ./gradlew :dd-java-agent:instrumentation:opentelemetry:opentelemetry-1.47:test fails before tests in unrelated :dd-java-agent:agent-jmxfetch:compileJava; the local otel-bootstrap shadow artifact is missing datadog.trace.bootstrap.otel.api.common.AttributeKey and Attributes.

@sameerank sameerank added comp: openfeature OpenFeature type: bug Bug report and fix tag: ai generated Largely based on code generated by an AI or LLM labels Jun 25, 2026
@dd-octo-sts

dd-octo-sts Bot commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

🟡 Java Benchmark SLOs — Performance SLO warning (near threshold)

Suite Status
Startup 🟡 warning

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 13.98 s 14.00 s [-0.9%; +0.6%] (no difference)
startup:insecure-bank:tracing:Agent 12.94 s 13.05 s [-1.6%; -0.0%] (maybe better)
startup:petclinic:appsec:Agent 17.39 s 17.20 s [+0.1%; +2.1%] (maybe worse)
startup:petclinic:iast:Agent 17.32 s 17.58 s [-2.2%; -0.6%] (maybe better)
startup:petclinic:profiling:Agent 17.52 s 17.47 s [-0.6%; +1.2%] (no difference)
startup:petclinic:sca:Agent 17.45 s 17.29 s [+0.1%; +1.7%] (maybe worse)
startup:petclinic:tracing:Agent 16.46 s 16.19 s [-3.0%; +6.2%] (no difference)

Commit: 051539dc · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: openfeature OpenFeature tag: ai generated Largely based on code generated by an AI or LLM type: bug Bug report and fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant