Skip to content

Populate source.name and source.version on flag_evaluations and exposures EVP - #12200

Draft
vjfridge wants to merge 4 commits into
masterfrom
vickie/ffl-2995-sdk-name-and-version-java
Draft

Populate source.name and source.version on flag_evaluations and exposures EVP#12200
vjfridge wants to merge 4 commits into
masterfrom
vickie/ffl-2995-sdk-name-and-version-java

Conversation

@vjfridge

@vjfridge vjfridge commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

Summary

The Java server SDK emits flag_evaluations and exposures EVP data via FeatureFlagEvpPublisher/api/v2/flagevaluation, but did not populate the SDK/tracer name or version on the payload. Grep of products/feature-flagging for source.name, source.version, telemetry.sdk.*, sdk.version returned zero matches.

Change

FeatureFlagEvpContext.from builds the top-level context map shared by both the flagevaluation and exposures EVP writers (FlagEvaluationWriterImpl and ExposureWriterImpl both call it). Add two keys:

  • source.name"dd-trace-java" (new SOURCE_NAME constant)
  • source.versionTracerVersion.TRACER_VERSION (existing build-time constant, read from the dd-java-agent.version resource — the same value the telemetry module sends as tracer_version on heartbeats)

Because the context map is shared, this single change populates the source.name / source.version facets on both EVP streams.

Prior art

TelemetryRequestBody (telemetry module) already sends tracer_version and language_name on every telemetry request. This reuses the same TracerVersion.TRACER_VERSION constant — no new version-lookup machinery.

Testing

  • ./gradlew :products:feature-flagging:feature-flagging-lib:test
  • ./gradlew :products:feature-flagging:feature-flagging-lib:spotlessCheck
  • Updated ExposureWriterTests.assertContext to assert source.name and source.version (referencing TracerVersion.TRACER_VERSION so the assertion is environment-agnostic).

Jira

Generated with Claude Code

…ures EVP

FeatureFlagEvpContext.from builds the top-level context map shared by both
the flagevaluation and exposures EVP writers. Add source.name ("dd-trace-java")
and source.version (TracerVersion.TRACER_VERSION) so the SDK identity facets
are populated on both EVP streams. This closes the gap noted in the Feature
Flag Observability Telemetry Roadmap where the Java server SDK emitted no
SDK/tracer name or version on the flag_evaluations EVP stream.

Co-Authored-By: Claude <noreply@anthropic.com>
@vjfridge vjfridge added tag: ai generated Largely based on code generated by an AI or LLM comp: openfeature OpenFeature comp: telemetry Telemetry type: feature Enhancements and improvements labels Aug 12, 2026
@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 32.99% (-25.36%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 4aa5a6f | Docs | Datadog PR Page | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

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 14.03 s 14.01 s [-0.8%; +1.0%] (no difference)
startup:insecure-bank:tracing:Agent 12.88 s 13.02 s [-1.8%; -0.3%] (maybe better)
startup:petclinic:appsec:Agent 16.99 s 16.92 s [-0.5%; +1.4%] (no difference)
startup:petclinic:iast:Agent 17.02 s 16.97 s [-0.6%; +1.2%] (no difference)
startup:petclinic:profiling:Agent 16.70 s 16.91 s [-2.3%; -0.3%] (maybe better)
startup:petclinic:sca:Agent 16.85 s 16.49 s [+1.1%; +3.3%] (significantly worse)
startup:petclinic:tracing:Agent 16.16 s 16.08 s [-0.5%; +1.6%] (no difference)

Commit: 5dc3b91a · 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.

@PerfectSlayer PerfectSlayer removed the comp: telemetry Telemetry label Aug 13, 2026
vjfridge and others added 2 commits August 13, 2026 13:26
…ntext

The flagevaluation track schema (logs-backend flagevaluation.conf) declares
source.name/source.version as top-level per-event fields, siblings of
flag/variant/targeting_key. The previous implementation put them in the
batch context envelope alongside service/env/version, which the EVP indexer
maps to context.source.* — an undeclared facet that causes the indexer to
drop the entire event.

Move source to the FlagEvaluationEvent top level (as a nested source object
{name,version}) so it lands on the declared source.name/source.version
facets. Verified end-to-end via ffe-dogfooding against staging: Java
flagevaluation events now index in the staging flag_evaluations data source.

Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
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: feature Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants