Populate source.name and source.version on flag_evaluations and exposures EVP - #12200
Draft
vjfridge wants to merge 4 commits into
Draft
Populate source.name and source.version on flag_evaluations and exposures EVP#12200vjfridge wants to merge 4 commits into
vjfridge wants to merge 4 commits into
Conversation
…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>
Contributor
|
🎯 Code Coverage (details) 🔗 Commit SHA: 4aa5a6f | Docs | Datadog PR Page | Give us feedback! |
Contributor
🟢 Java Benchmark SLOs — All performance SLOs passed
PR vs. master results
Commit: Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion. |
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The Java server SDK emits
flag_evaluationsandexposuresEVP data viaFeatureFlagEvpPublisher→/api/v2/flagevaluation, but did not populate the SDK/tracer name or version on the payload. Grep ofproducts/feature-flaggingforsource.name,source.version,telemetry.sdk.*,sdk.versionreturned zero matches.Change
FeatureFlagEvpContext.frombuilds the top-levelcontextmap shared by both theflagevaluationandexposuresEVP writers (FlagEvaluationWriterImplandExposureWriterImplboth call it). Add two keys:source.name→"dd-trace-java"(newSOURCE_NAMEconstant)source.version→TracerVersion.TRACER_VERSION(existing build-time constant, read from thedd-java-agent.versionresource — the same value the telemetry module sends astracer_versionon heartbeats)Because the context map is shared, this single change populates the
source.name/source.versionfacets on both EVP streams.Prior art
TelemetryRequestBody(telemetry module) already sendstracer_versionandlanguage_nameon every telemetry request. This reuses the sameTracerVersion.TRACER_VERSIONconstant — no new version-lookup machinery.Testing
./gradlew :products:feature-flagging:feature-flagging-lib:test✅./gradlew :products:feature-flagging:feature-flagging-lib:spotlessCheck✅ExposureWriterTests.assertContextto assertsource.nameandsource.version(referencingTracerVersion.TRACER_VERSIONso the assertion is environment-agnostic).Jira
flag_evaluationsemit sdk name and versionGenerated with Claude Code