Include sdk name/version for flag config requests#3162
Merged
Conversation
|
🎯 Code Coverage 🔗 Commit SHA: d06d781 | Docs | Datadog PR Page | Was this helpful? Give us feedback! |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #3162 +/- ##
===========================================
+ Coverage 70.89% 70.99% +0.10%
===========================================
Files 912 912
Lines 33542 33549 +7
Branches 5640 5640
===========================================
+ Hits 23779 23816 +37
+ Misses 8183 8155 -28
+ Partials 1580 1578 -2
🚀 New features to boost your workflow:
|
aleksandr-gringauz
approved these changes
Jan 29, 2026
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.
What does this PR do?
Adds a new
sourcefield to the/precompute-assignmentsendpoint request payload containing SDK identification information (sdk_nameandsdk_version). This allows the backend to track which SDK and version is making feature flag configuration requests.The resulting payload structure:
{ "data": { "type": "precompute-assignments-request", "attributes": { "env": { "dd_env": "production" }, "source": { "sdk_name": "dd-sdk-android", "sdk_version": "3.7.0" }, "subject": { "targeting_key": "user123", "targeting_attributes": {...} } } } }Motivation
This change aligns with the iOS SDK implementation (DataDog/dd-sdk-ios#2656) to provide consistent SDK metadata across platforms. The
sourceinformation will be used for logging feature flagging configuration requests to calculate usage metrics and track which SDK versions are being used.Additional Notes
Changes made:
sdkVersionproperty toFlagsContextdata classFlagsContext.create()to passsdkVersionfromDatadogContextbuildSourcePayload()method inPrecomputedAssignmentsRequestFactorySDK_NAME = "dd-sdk-android"constantsdkVersionand validate thesourcefieldReview checklist (to be filled by reviewers)