Skip to content

App Insights Agents (Preview) dashboard requires deprecated gen_ai.system attribute instead of gen_ai.provider.name #45211

@evmimagina

Description

@evmimagina

Summary

The Agents (Preview) blade in Azure Application Insights requires the deprecated gen_ai.system OpenTelemetry attribute to render GenAI spans. The OpenTelemetry Semantic Conventions have replaced gen_ai.system with gen_ai.provider.name, and SDKs like langchain-azure-ai (AzureAIOpenTelemetryTracer) already emit gen_ai.provider.name correctly — but the dashboard does not read it.

Observed Behavior

  • GenAI spans emitted by langchain-azure-ai (v1.0.4) via AzureAIOpenTelemetryTracer include gen_ai.provider.name = "azure.ai.openai" but not gen_ai.system.
  • These spans appear correctly in the dependencies table with all gen_ai.* attributes (token counts, operation name, response model, etc.).
  • However, the Agents (Preview) view does not display them.
  • When we inject gen_ai.system = "openai" via a custom SpanProcessor, the same spans render correctly in the Agents view with type = "GenAI | openai".

Steps to Reproduce

  1. Configure azure-monitor-opentelemetry with configure_azure_monitor().
  2. Create an AzureAIOpenTelemetryTracer (from langchain-azure-ai>=1.0.4) reusing the global OTel providers.
  3. Invoke a LangChain chain that calls Azure OpenAI.
  4. Query dependencies table — GenAI spans are present with gen_ai.provider.name but without gen_ai.system.
  5. Open App Insights > Agents (Preview) — no data is rendered for these spans.

Expected Behavior

The Agents (Preview) dashboard should read gen_ai.provider.name (the current OpenTelemetry semantic convention) to identify and render GenAI spans, rather than relying exclusively on the deprecated gen_ai.system.

Current Workaround

We use a SpanProcessor that injects gen_ai.system into spans that have gen_ai.* attributes but are missing gen_ai.system:

class _GenAISystemSpanProcessor(SpanProcessor):
    def on_end(self, span):
        if not span.attributes:
            return
        has_genai = any(k.startswith("gen_ai.") for k in span.attributes)
        if has_genai and "gen_ai.system" not in span.attributes:
            span._attributes["gen_ai.system"] = "openai"

Environment

azure-monitor-opentelemetry (latest)
langchain-azure-ai>=1.0.4
Python 3.12
Deployed on AKS and tested locally via Docker Desktop
App Insights resource in West Europe

References

OTel Semantic Conventions: gen_ai.system deprecated in favor of gen_ai.provider.name
Azure AI Foundry: Trace agent frameworks with Application Insights

Metadata

Metadata

Assignees

No one assigned

    Labels

    customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-triageWorkflow: This is a new issue that needs to be triaged to the appropriate team.questionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions