Skip to content

Python docs: Errors with configure Azure AI Agent Client observability #1527

@pamelafox

Description

@pamelafox

I tried to follow this:
https://learn.microsoft.com/en-us/agent-framework/tutorials/agents/enable-observability?pivots=programming-language-python#azure-ai-foundry-integration

agent_client = AzureAIAgentClient(
    credential=AzureCliCredential(),
    project_endpoint=f"https://{os.environ['AZURE_AI_PROJECT']}.foundry.azure.com"
)
agent_client.setup_azure_ai_observability(enable_sensitive_data=True, exporters=[ConsoleSpanExporter()])

However, I got an error:

agent_framework.exceptions.ServiceInitializationError: Azure AI model deployment name is required. Set via 'model_deployment_name' parameter or 'AZURE_AI_MODEL_DEPLOYMENT_NAME' environment variable.

I don't know why I'd need a model for observability to work?

Also, I was generally confused by this section: can I use this approach for any kind of agent, or is this only for hosted AI Foundry agents? That'd be great to clarify.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions