1.45.0's stop-decoding-bytes-attributes change silently breaks downstream instrumentation that relied on the old coercion
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 1/5
- 見積もり時間
- 1時間未満
- 初心者へのやさしさ
- 70/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- python
調査の方向性
1.45.0 の changelog エントリから始め、移行ノートがどこで管理されているかを確認します。bytes 値の属性が現在は bytes のまま維持され、デコードされた JSON 文字列ではなく AnyValue.bytes_value として現れる場合があることを記録し、関連する LangSmith issue を完了条件としてリンクします。
索引モデルが issue の本文から書いたものです。
説明
Not a bug report — flagging a compatibility edge the 1.45.0 changelog entry
didn't call out, in case it's worth a line in the migration notes for anyone
who greps for it later.
If a
bytestype is set as an attribute value in the SDK, it will no longer
be utf-8 decoded to a string, instead it will be passed along as is in
accordance with the OTEL spec.
Before 1.45.0, Span.set_attribute(key, some_bytes) silently coerced
some_bytes to str via utf-8 decode. After 1.45.0, the same call now
exports AnyValue.bytes_value on the wire. That's the documented, correct,
spec-compliant behaviour, and I'm not asking for it to change.
What I ran into: at least one popular instrumentation library
(langchain-ai/langsmith-sdk's OTel exporter — reported separately, langchain-ai/langsmith-sdk#3602)
has, across every version I checked, called set_attribute with a bytes
value for its main prompt/completion payload, apparently unintentionally,
relying on the old SDK behaviour to turn it back into readable text. Upgrading
only opentelemetry-sdk/opentelemetry-api (no code change, no langsmith
version change) silently turned every one of those attributes from a JSON
string into an opaque binary blob for anyone reading the exported traces —
no error, no warning, same span count, same attribute keys, just a different
wire type carrying the same bytes.
Nothing to fix here since the change is correct per spec, and it's the
instrumentation library's bug for passing bytes when it meant str. Just
noting it in case it's useful to link from the 1.45.0 changelog entry or the
migration guide, since this specific failure mode (payload silently becomes
unreadable, no exception anywhere) seems like exactly the kind of thing that's
hard for an instrumentation-library author to notice in their own tests if
they only assert on in/substring checks against the in-memory exporter
rather than the attribute's actual type.
- 主要言語
- Python
- スター
- 2.6k
- フォーク
- 1k
- 平均マージ
- 5日 7時間
- マージ済み PR(30日)
- 27
環境構築
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
open-telemetry/opentelemetry-python のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
open-telemetry/opentelemetry-python#5695 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
open-telemetry/opentelemetry-python#5661 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
open-telemetry/opentelemetry-python#5638 ·
メンテナーはふだん 2 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
open-telemetry/opentelemetry-python#5624 ·
メンテナーはふだん 2 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
open-telemetry/opentelemetry-python#5574 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
open-telemetry/opentelemetry-python の issue をすべて見る
似ている issue
-
namespace operations
難易度 1/5 1時間未満 初心者へのやさしさ 82/100
EclipseFdn/open-vsx.org#13573 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
collective/icalendar#1854 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
rancher/rancher-ai-agent#412 ·
メンテナーはふだん 6 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
TUDelftGeodesy/DePSI#134 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
HenriquesLab/rxiv-maker#335 ·