Scores bypass sample_rate since v4
@hassiebp 已经在做这个了。
开始于 2026年9月18日。
评估
这个 Issue 还没有评估数据。
描述
Since 4.0.0, sample_rate is applied to traces but not to scores. A run sampled at 0.001 still uploads a score for every sample, all pointing at traces that were never exported.
The reason is that create_score builds the ScoreBody with camelCase kwargs (traceId, observationId, ...). The v4 Fern models expect the snake_case field names and, because extra is allowed, quietly store the camelCase ones as extras. So body.trace_id is None, and add_score_task treats every score as a session score and skips the sampler. The request still looks right on the wire only because model_dump passes the extras through.
Check: sample_rate 0.001, 2000 generations, one create_score per generation. On 3.10.3 that enqueues 2 scores. On 4.0.0 and 4.15.4 it enqueues about 1770.
- 主要语言
- Python
- 星标
- 468
- 派生
- 349
- 平均合并
- 15 小时 51 分钟
- 30 天内合并 PR
- 24
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
langfuse/langfuse-python 的其他 Issue
-
bug compliance feat-data-masking sdk-python security
langfuse/langfuse-python#1896 · 已指派 1 人 ·
-
bug feat-evals sdk-python
langfuse/langfuse-python#1861 · 2 条评论 · 已指派 1 人 ·
-
improvement sdk-python
langfuse/langfuse-python#1856 · 已指派 1 人 ·
-
improvement sdk-python security
langfuse/langfuse-python#1855 · 已指派 1 人 ·
-
billing bug feat-billing feat-llm-cost-tracking integration-openai sdk-python
langfuse/langfuse-python#1834 · 1 条评论 · 已指派 1 人 ·
查看 langfuse/langfuse-python 的全部 Issue
相似的 Issue
-
agent-ready documentation needs-triage
难度 1/5 1-3 小时 新手友好度 88/100
-
documentation
难度 1/5 1 小时以内 新手友好度 91/100
-
workflow-status page template still says reusable workflows are "triggered only by workflow_call:" 未关闭
难度 1/5 1 小时以内 新手友好度 92/100
-
instance instance add
难度 1/5 1 小时以内 新手友好度 72/100
searxng/searx-instances#939 · 1 条评论 ·
-
area-deployment area-integrations triage:bot-seen
难度 2/5 半天 新手友好度 86/100