InferenceOperationType.value casing inconsistent with OTel GenAI semantic conventions
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 68/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Ít trao đổi
- Công nghệ
- python
- Lĩnh vực
- observability-sre
Hướng nghiên cứu
Bắt đầu với libraries/microsoft-agents-a365-observability-core/microsoft_agents_a365/observability/core/inference_operation_type.py và lần theo cách các giá trị của nó đi đến gen_ai.operation.name thông qua InferenceScope. So sánh các điểm đầu vào của instrumentation thủ công và tự động được mô tả trong Agent365-Samples PR #288. Công việc được xem là hoàn tất khi instrumentation thủ công phát ra các tên operation viết thường giống với instrumentation tự động, đồng thời đã xem xét ảnh hưởng đến khả năng tương thích.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Python
- Star
- 41
- Fork
- 23
- Merge trung bình
- 7 giờ 43 phút
- Pull request đã merge (30 ngày)
- 3
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của microsoft/Agent365-python
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 78/100
microsoft/Agent365-python#271 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
microsoft/Agent365-python#270 ·
-
[python/agent-framework/sample-agent] Sample dependencies are inconsistent on PyPI — cannot run Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 38/100
microsoft/Agent365-python#262 ·
-
microsoft/Agent365-python#257 · 2 bình luận · 1 người được giao ·
-
microsoft/Agent365-python#239 · 1 reaction · 2 người được giao ·
Tất cả issue của microsoft/Agent365-python
Issue tương tự
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
zostera/django-bootstrap4#894 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
use-agent-os/agent-os#3276 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
zephyrproject-rtos/zephyr#119726 ·
-
area/auth bug comp/agent P3 platform/discord type/security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
NousResearch/hermes-agent#117848 ·