Repository navigation
feat: Record exposures under local evaluation - #251
Conversation
Map the multivariate option key and the feature state's experiment into the evaluation context, and carry the variant and experiment onto identity flags. Environment flags carry no experiment. Skip the exposure when the flag has no variant.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Zaimwa9
left a comment
There was a problem hiding this comment.
Approved with a NIT, leaving it up to you. I think we also need to bump the engine test data
🤖 I have created a release *beep* *boop* --- ## [8.4.0](v8.3.0...v8.4.0) (2026-11-06) ### Features * Record exposures under local evaluation ([#251](#251)) ([106d8a6](106d8a6)) ### Other * Let Renovate keep updating spec bumps the webhook handler commits to ([#246](#246)) ([e278fd5](e278fd5)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
Part of Flagsmith/flagsmith-private#325. Java counterpart of Flagsmith/flagsmith-python-client#276, Flagsmith/flagsmith-go-client#246 and Flagsmith/flagsmith-nodejs-client#318.
getExperimentFlagonly recorded exposures under remote evaluation. The environment document carriesmetadata.experimenton feature states, but local evaluation dropped it, along with the variant.Changes
keyinto the evaluation context, and carryvariantfrom the evaluation result ontoFlag. Locally evaluated identity flags now report their variant.metadata.experimentinto the context's feature metadata, and carry it onto identity flags.getEnvironmentFlagsdoes no extra work per call.getExperimentFlagrecords no exposure when the flag has no variant, as the other SDKs do.Tests
experiment_id; outside the rollout, an identity override, and a feature without an experiment record none.