InferenceOperationType.value casing inconsistent with OTel GenAI semantic conventions
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Accessibilité débutants
- 68/100
- Type d'issue
- Bug
- Clarté
- Clairement spécifiée
- Activité
- Calme
- Stack technique
- python
- Domaine
- observability-sre
Piste de recherche
Commencez par libraries/microsoft-agents-a365-observability-core/microsoft_agents_a365/observability/core/inference_operation_type.py et suivez comment ses valeurs parviennent à gen_ai.operation.name via InferenceScope. Comparez les points d’entrée de l’instrumentation manuelle et automatique décrits dans Agent365-Samples PR #288. Le travail est considéré comme terminé lorsque l’instrumentation manuelle émet les mêmes noms d’opération en minuscules que l’instrumentation automatique, en tenant compte de l’impact sur la compatibilité.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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
- Langage dominant
- Python
- Étoiles
- 41
- Forks
- 23
- Merge moyen
- 7 h 43 min
- PR mergées (30 j)
- 3
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de microsoft/Agent365-python
-
Difficulté 3/5 1-2 jours Accessibilité débutants 78/100
microsoft/Agent365-python#271 ·
-
Difficulté 3/5 1-2 jours Accessibilité débutants 68/100
microsoft/Agent365-python#270 ·
-
[python/agent-framework/sample-agent] Sample dependencies are inconsistent on PyPI — cannot run Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 38/100
microsoft/Agent365-python#262 ·
-
microsoft/Agent365-python#257 · 2 commentaires · 1 personne assignée ·
-
microsoft/Agent365-python#239 · 1 réaction · 2 personnes assignées ·
Toutes les issues de microsoft/Agent365-python
Issues similaires
-
area/auth bug comp/agent P3 platform/discord type/security
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
NousResearch/hermes-agent#117848 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
bancolombia/sentinel#23 ·
-
test md OuverteCI
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulté 2/5 1-3 heures Accessibilité débutants 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100