InferenceOperationType.value casing inconsistent with OTel GenAI semantic conventions
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 68/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 技術スタック
- python
調査の方向性
libraries/microsoft-agents-a365-observability-core/microsoft_agents_a365/observability/core/inference_operation_type.py から始め、値が InferenceScope を介して gen_ai.operation.name に到達するまでを追跡します。Agent365-Samples PR #288 で説明されている手動インストルメンテーションと自動インストルメンテーションのエントリポイントを比較します。手動インストルメンテーションが自動インストルメンテーションと同じ小文字のオペレーション名を出力し、互換性への影響が考慮されていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Issue
The InferenceOperationType enum in libraries/microsoft-agents-a365-observability-core/microsoft_agents_a365/observability/core/inference_operation_type.py uses capitalized values (Chat, TextCompletion, GenerateContent). These values flow into gen_ai.operation.name span attributes via InferenceScope (manual instrumentation).
The OpenTelemetry GenAI semantic conventions specify lowercase for gen_ai.operation.name values (e.g., chat, text_completion, embeddings). The auto-instrumentation extension packages (e.g., microsoft-agents-a365-observability-extensions-openai) correctly emit lowercase values.
Effect
Customers using manual instrumentation see gen_ai.operation.name="Chat", customers using auto instrumentation see gen_ai.operation.name="chat" for the same operation. Backend filters and dashboards built around one casing won't match spans produced by the other.
Repro
End-to-end run of the two samples in microsoft/Agent365-Samples PR #288:
python/observability-with-otlp/main.py(manual instrumentation): emitsgen_ai.operation.name="Chat", span nameChat gpt-4o-minipython/observability-with-azure-monitor/main.py(auto-instrumentation): emitsgen_ai.operation.name="chat", span namechat gpt-4.1
Suggested fix
Change InferenceOperationType values to lowercase to match the OTel spec and auto-instrumentation behavior:
```python
class InferenceOperationType(Enum):
CHAT = "chat"
TEXT_COMPLETION = "text_completion"
GENERATE_CONTENT = "generate_content"
```
This is a behavior change — backend dashboards filtering by Chat would stop matching. May need a major-version bump or a transitional period.
Related
- PR #288 in Agent365-Samples documents the discrepancy in the sample READMEs
- Companion docs PR (forthcoming) on Agent365-python documents it in the integration guide
🤖 Filed via Claude Code while validating samples
- 主要言語
- Python
- スター
- 41
- フォーク
- 23
- 平均マージ
- 7時間 43分
- マージ済み PR(30日)
- 3
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/Agent365-python のほかの issue
-
難易度 3/5 1〜2日 初心者へのやさしさ 78/100
microsoft/Agent365-python#271 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
microsoft/Agent365-python#270 ·
-
[python/agent-framework/sample-agent] Sample dependencies are inconsistent on PyPI — cannot run オープン
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
microsoft/Agent365-python#262 ·
-
microsoft/Agent365-python#257 · コメント 2 件 · 担当者 1 名 ·
-
microsoft/Agent365-python#239 · リアクション 1 件 · 担当者 2 名 ·
microsoft/Agent365-python の issue をすべて見る
似ている issue
-
area/auth bug comp/agent P3 platform/discord type/security
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
NousResearch/hermes-agent#117848 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
bancolombia/sentinel#23 ·
-
test md オープンCI
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
langchain-ai/deepagents#6450 ·
-
bug client
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100