Page MenuHomePhabricator

Add Experiment#sendExposure method to SDKs
Closed, ResolvedPublic3 Estimated Story Points

Description

Experiment implementations should include a call to Experiment#sendExposure() for producing an exposure event which will be used in GrowthBook's experiment assignment queries to:

  • establish each subject's earliest exposure to a variation
  • determine if any subject was exposed to more than one variation

Specification

PropertyValue
action"experiment_exposure"

Acceptance criteria

Event Timeline

KReid-WMF updated the task description. (Show Details)
KReid-WMF moved this task from Incoming to READY TO GROOM on the Test Kitchen board.
KReid-WMF updated the task description. (Show Details)
KReid-WMF set the point value for this task to 3.

Change #1239018 had a related patch set uploaded (by Santiago Faci; author: Santiago Faci):

[mediawiki/extensions/TestKitchen@master] JS and PHP SDK: Add logExposure method

https://gerrit.wikimedia.org/r/1239018

Per slack conversation we agreed on implementing a sendExposure method instead of logExposure as we planned initially in this ticket. That way the new method will be aligned with send which is the existing method that JS and PHP SDK use to send events.

The submitted patch above has been updated accordingly

Change #1239018 merged by jenkins-bot:

[mediawiki/extensions/TestKitchen@master] JS and PHP SDK: Add sendExposure method

https://gerrit.wikimedia.org/r/1239018

mpopov renamed this task from Add Experiment#logExposure method to SDKs to Add Experiment#sendExposure method to SDKs.Feb 25 2026, 8:41 PM
mpopov updated the task description. (Show Details)

If I'm not remembering wrongly, we moved it to Done because we already had T414735: Document guidelines, scenarios, and recommendations on exposure logging to work on related documentation. Is that correct?

We discussed it in the standup meeting yesterday and I clarified (and then updated the task description) that we still need basic usage documented on https://wikitech.wikimedia.org/wiki/Test_Kitchen/Conduct_an_experiment, because how else would developers know to use this method?

The other task is now about writing a guide to exposure logging specifically, with the guide being on https://wikitech.wikimedia.org/wiki/Test_Kitchen/Experiment_exposure_logging (and then linked to from the Conduct page)

We discussed it in the standup meeting yesterday and I clarified (and then updated the task description) that we still need basic usage documented on https://wikitech.wikimedia.org/wiki/Test_Kitchen/Conduct_an_experiment, because how else would developers know to use this method?

The other task is now about writing a guide to exposure logging specifically, with the guide being on https://wikitech.wikimedia.org/wiki/Test_Kitchen/Experiment_exposure_logging (and then linked to from the Conduct page)

Oops! You are right! Now I'm remembering what you say. Thanks!

Sfaci updated the task description. (Show Details)

Regarding the missing work here, the one that corresponds to the Documentation of API:

Sfaci updated the task description. (Show Details)
mpopov updated the task description. (Show Details)

Updated the docs. Task now all done! Thank you very much, Santi!