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): emits gen_ai.operation.name="Chat", span name Chat gpt-4o-mini
python/observability-with-azure-monitor/main.py (auto-instrumentation): emits gen_ai.operation.name="chat", span name chat 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
Issue
The
InferenceOperationTypeenum inlibraries/microsoft-agents-a365-observability-core/microsoft_agents_a365/observability/core/inference_operation_type.pyuses capitalized values (Chat,TextCompletion,GenerateContent). These values flow intogen_ai.operation.namespan attributes viaInferenceScope(manual instrumentation).The OpenTelemetry GenAI semantic conventions specify lowercase for
gen_ai.operation.namevalues (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 seegen_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-SamplesPR #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.1Suggested fix
Change
InferenceOperationTypevalues 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
Chatwould stop matching. May need a major-version bump or a transitional period.Related
🤖 Filed via Claude Code while validating samples