等 opentelemetry-api 修复其类型别名后,请删除本地的 AttributeValue 别名
作者: axiomofjoy创建于 2026年9月28日更新于 2026年9月28日
opentelemetry-api 1.45.0 通过连锁赋值定义了 `AnyValue = AttributeValue = ...`,mypy 并不接受这种类型别名(open-telemetry/opentelemetry-Python#5701)。 #16549 通过在 `phoenix.trace.attributes` 中添加一个镜像别名来解决了这个问题,服务器会导入该别名,而不是 `opentelemetry.util.types.AttributeValue`。
内容来源: Arize-ai/phoenix