Non-scalar span attribute makes the server reject the whole event batch
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 68/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- python
调研方向
Start with SpanContextManager.set_attributes() in wildedge/client.py:223 and the span constructor, then run the provided reproduction to confirm the 422 and dropped batch. Decide how non-scalar values should be handled, including whether to warn or coerce them, and update the relevant tests if present. Done means a non-scalar attribute no longer causes unrelated events in the batch to be rejected.
由索引模型根据 Issue 内容生成。
描述
What happens
SpanContextManager.set_attributes() (wildedge/client.py:223) accepts any value. If one value is a list, e.g. span.set_attributes(rejections=["English", "too long"]), ingest answers 422 (span attributes['rejections'] must be a scalar) and every event in that batch is dropped: model loads, inferences and spans that had nothing to do with the bad attribute.
Found while integrating a llama.cpp + Whisper app; a whole run's telemetry disappeared because of one attribute.
Expected
One bad value should never cost unrelated events. Options, roughly in order of preference:
- Validate in
set_attributes()/ span constructor: drop (orstr()) non-scalar values and log a warning once. - Coerce lists of scalars to a joined string (plus a
<key>_count?) — that's what we did app-side as a workaround. - On a 422 that names a field, retry the batch without the offending event instead of dropping all of it.
Repro
client = wildedge.init()
with client.trace(run_id="r"):
with client.span(kind="custom", name="s") as span:
span.set_attributes(tags=["a", "b"])
client.close(timeout=5) # batch rejected with 422, nothing ingested
SDK 0.2.2.
🤖 Generated with Claude Code
- 主要语言
- Python
- 星标
- 17
- 派生
- 1
- 平均合并
- 23 分钟
- 30 天内合并 PR
- 7
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
wild-edge/wildedge-python 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 82/100
wild-edge/wildedge-python#63 ·
-
难度 2/5 1-3 小时 新手友好度 82/100
wild-edge/wildedge-python#62 ·
-
难度 3/5 1-2 天 新手友好度 72/100
wild-edge/wildedge-python#65 ·
-
难度 3/5 1-2 天 新手友好度 72/100
wild-edge/wildedge-python#64 ·
-
vLLM integration可能重新可做 @piotrekno1 于 119 天前认领,目前没有进行中的 PR。 未关闭
wild-edge/wildedge-python#38 · 已指派 1 人 ·
查看 wild-edge/wildedge-python 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 74/100
eclipse-score/inc_someip_gateway#356 ·
维护者通常 2 天内回复
-
[BUG]: `GitHubRestAdapter.check_user_permission` and `has_write_access` raise `TypeError` (missing `params`), silently disabling the inactivity lifecycle可能已有人在做 @tarunagnihotri534 今天认领。 未关闭bug
难度 2/5 1-3 小时 新手友好度 67/100
AOSSIE-Org/Gitcord-GithubDiscordBot#167 · 1 条评论 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
mihai-vlc/sublime-jsfmt#56 ·
-
comp/cli comp/plugins P2 type/bug
难度 2/5 1-3 小时 新手友好度 75/100
NousResearch/hermes-agent#141917 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 78/100
riscv/riscv-opcodes#441 ·