Ensure tag values are strings
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 42/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- python
研究方向
定位 Python SDK 在 Scope、Span 以及其他相關進入點上的 set_tag 方法,然後檢查它們的值如何儲存並序列化到 envelopes 中。為字串、非字串和轉換失敗的情況補充涵蓋。完成的標準是標籤值符合事件負載要求,且轉換失敗時不會設定標籤。
由索引模型根據 Issue 內容生成。
描述
Tag values must be strings; however, the Python SDK's methods for setting tags (set_tag on the Scope, on Span, and perhaps elsewhere) are defined as taking type Any for the value, and we do not convert the value to a string before setting the tag.
While this appears to not be a problem for most users (likely our transport handles non-string-valued tags), it becomes a problem for users who wish to serialize the envelopes to send them with another service, like Sentry CLI. Since our spec requires tags to have string values, other services, in particular Sentry CLI, will refuse to accept envelopes created by the Python SDK when they contain a tag with a non-string value. See for example the issue CLI-80 (GitHub getsentry/sentry-cli#2505), which is caused by the Python SDK setting a non-string-valued tag.
My proposed solution is to modify all of our set_tag functions to convert all values to strings before setting them on the tag. If the conversion fails, we don't set the tag.
(Follow up from https://github.com/getsentry/sentry-python/issues/4391 which was done on the potel-base branch)
- 主要語言
- Python
- 星號
- 2.2k
- 分支
- 682
- 平均合併
- 1 天 7 小時
- 30 天內合併 PR
- 246
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
getsentry/sentry-python 的其他 Issue
-
Improvement Python Spans
難度 2/5 1-3 小時 新手友好度 78/100
getsentry/sentry-python#7876 · 2 則留言 ·
維護者通常 1 天內回覆
-
Bug Python
難度 2/5 1-3 小時 新手友好度 76/100
getsentry/sentry-python#7870 · 2 則留言 ·
維護者通常 1 天內回覆
-
Python
難度 2/5 1-3 小時 新手友好度 68/100
getsentry/sentry-python#6992 · 1 則留言 ·
維護者通常 1 天內回覆
-
Improvement Python
難度 2/5 1-3 小時 新手友好度 65/100
getsentry/sentry-python#6970 · 1 則留言 ·
維護者通常 1 天內回覆
-
match_regex_list raises IndexError when a pattern list contains an empty string可能已有人在做 @wahajahmed010 於 106 天前認領。 未關閉Bug Python
難度 2/5 1-3 小時 新手友好度 74/100
getsentry/sentry-python#6504 · 1 則留言 ·
維護者通常 1 天內回覆
查看 getsentry/sentry-python 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 72/100
NousResearch/hermes-agent#136483 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 88/100
維護者通常 1 天內回覆
-
[BUG] LazyStackedTensorDictStore zeroes the last byte of a new key set on the last element可能已有人在做 @peterdsharpe 今天認領。 未關閉bug
難度 2/5 1-3 小時 新手友好度 78/100
pytorch/tensordict#2307 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
GrokModel.generate/a_generate pass an OpenAI-style list-of-dicts to xai_sdk.chat.user(), so every call crashes with a protobuf TypeError before any network I/O可能已有人在做 @Christian-Sidak 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 70/100
confident-ai/deepeval#3436 · 1 則留言 ·
維護者通常 1 天內回覆