Skip to content

Send feature flag SDK identity in request headers - #12200

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

Send feature flag SDK identity in request headers#12200
vjfridge wants to merge 10 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

Send Java SDK identity as request metadata on both flagevaluation and exposures EVP requests while keeping their JSON payloads unchanged.

  • DD-EVP-ORIGIN: dd-trace-java
  • DD-EVP-ORIGIN-VERSION: TracerVersion.TRACER_VERSION

Change

  • Configure immutable SDK identity headers once on the dedicated feature-flag BackendApiFactory.
  • Attach the headers through scoped OkHttp clients used by both EVP proxy and direct intake.
  • Preserve the headers automatically when agentless delivery falls back from the local proxy to direct intake.
  • Leave BackendApi, EvpProxyApi, and IntakeApi request APIs unchanged.
  • Supersede FFL-2995's event-level source payload approach, which is incompatible with the deployed strict payload schema.

Testing

  • ./gradlew :communication:clean :communication:test :communication:jacocoTestCoverageVerification -PtestJvm=8 -PcheckCoverage
  • ./gradlew :products:feature-flagging:feature-flagging-lib:clean :products:feature-flagging:feature-flagging-lib:test -PtestJvm=8 -PcheckCoverage
  • ./gradlew :communication:spotlessCheck :products:feature-flagging:feature-flagging-lib:spotlessCheck
  • Fresh Codex review: no actionable findings.

Implements FFL-3016.

…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

This comment has been minimized.

@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.72 s 14.67 s [-0.4%; +1.1%] (no difference)
startup:insecure-bank:tracing:Agent 13.62 s 13.68 s [-1.2%; +0.3%] (no difference)

Commit: b4724e93 · 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 4 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>
@vjfridge vjfridge changed the title Populate source.name and source.version on flag_evaluations and exposures EVP Add source metadata to flag evaluation events Aug 28, 2026
@vjfridge vjfridge changed the title Add source metadata to flag evaluation events Send flag evaluation SDK identity in request headers Aug 28, 2026
Send SDK identity headers on both flag evaluation and exposure requests while preserving them across proxy-to-direct fallback. Keep the BackendApi request signature unchanged by configuring headers on feature-flag backend instances.\n\nGenerated with Claude Code
@vjfridge vjfridge changed the title Send flag evaluation SDK identity in request headers Send feature flag SDK identity in request headers Aug 28, 2026
Scope the SDK identity headers to feature-flag HTTP clients so both evaluation and exposure requests retain them across proxy and direct intake without modifying transport implementations.\n\nGenerated with Claude Code
@vjfridge

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

Reviewed commit: 1cb2c70e19

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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