Ensure tag values are strings
まだ誰も着手していません。
評価
- 難易度
- 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
- フォーク
- 672
- 平均マージ
- 22時間 47分
- マージ済み PR(30日)
- 224
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
getsentry/sentry-python のほかの issue
-
Python
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
getsentry/sentry-python#7569 · コメント 1 件 ·
-
Python
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
getsentry/sentry-python#7568 · コメント 2 件 ·
-
Python
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
getsentry/sentry-python#7567 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
getsentry/sentry-python#7543 · コメント 2 件 · 担当者 1 名 ·
-
Python
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
getsentry/sentry-python#6992 · コメント 1 件 ·
getsentry/sentry-python の issue をすべて見る
似ている issue
-
essnmx good first issue
難易度 1/5 1時間未満 初心者へのやさしさ 95/100
-
[Feature] 奇物选择添加优先级 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
syfoud/Simulated_Scepter#174 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Giskard-AI/giskard-oss#2840 · コメント 1 件 ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success オープンarea: repo bug perceived difficulty: 2
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
yeti-platform/yeti#1380 ·