SDKs: a hook called on each exposure, to send assignments to your own analytics

未关闭
#1,499 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
描述清楚
活跃度
活跃
技术栈
csharp, go, java, javascript, python, react, react-native

调研方向

The issue spans the JavaScript, Python, Go, React, React Native, Java and .NET SDKs, so there is no single file to jump into; each client constructor needs an optional callback plus the plumbing that records exposures server-side. Start by finding where each SDK evaluates a flag and caches the answer, so the hook fires once per exposure rather than per evaluation, and check the React server-render/hydration path for duplicate calls. Done means the callback receives experiment key, variant and user id once per exposure, errors from it are swallowed, the holdout/targeting case is decided and documented, and each SDK's docs show one example per analytics tool. A newcomer could instead pick one SDK and add the docs example for a single analytics tool as a scoped first step.

由索引模型根据 Issue 内容生成。

描述

enhancement

The SDKs record exposures on the server, but nothing lets an application see them. A team that analyses experiments
in its own analytics tool or warehouse (Segment, GA4, Amplitude, Mixpanel, RudderStack) has no way to send each
assignment there.

Expected:

  • An optional callback, set when the client is created, called once per exposure with the experiment key, the
    variant and the user id. Whether it is called when the user was not assigned (a holdout, a mutual exclusion group or
    targeting, where the server records no exposure) is decided and documented.
  • Once per exposure, not once per evaluation: repeated and cached answers, and React's server render followed by
    hydration, do not call it twice.
  • An exception thrown in the callback never reaches the caller or changes the answer.
  • In the JavaScript, Python, Go, React, React Native, Java and .NET SDKs, with one example per common analytics tool
    in the docs. (The OpenFeature providers use OpenFeature's own hooks.)
主要语言
Python
星标
0
派生
4
平均合并
5 小时 36 分钟
30 天内合并 PR
509

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Controlvar/controlvar 的其他 Issue

查看 Controlvar/controlvar 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。