Skip to content

Python: [Bug]: Foundry Prompt Agent client spans are not showing up in Foundry tracing UI #7492

Closed

Description

@TaoChenOSU

Description

When using a FoundryAgent in MAF, only the server-side spans are showing up in the tracing view of the agent in Foundry portal:

Image

There are also client-side spans created by MAF that ideally should also show up in the tracing view. Currently, they are only available in App Insights:

Image

Code Sample

Combine `samples/02-agents/providers/foundry/foundry_prompt_agents.py` + `samples/02-agents/observability/foundry_tracing.py` into a sample to run.

Error Messages / Stack Traces

Package Versions

agent-framework

Python Version

No response

Additional Context

(Unconfirmed) For the span to show up in Foundry, we may need the following attributes:

  • microsoft.foundry.project.id
  • gen_ai.agent.name
  • gen_ai.agent.id

Activity

  1. added
    pythonUsage: [Issues, PRs], Target: Python
    observabilityUsage: [Issues, PRs], Target: observability related features
    foundryUsage: [Issues, PRs], Target: all Foundry integrations
    hostingUsage: [Issues, PRs], Target: all hosting related solutions
    on Aug 3, 2026
  2. changed the title [-]Python: [Bug]: Foundry Agent client spans are not showing up in Foundry tracing UI[/-] [+]Python: [Bug]: Foundry Prompt Agent client spans are not showing up in Foundry tracing UI[/+] on Aug 20, 2026
  3. jpalvarezl commented on Sep 1, 2026

    @jpalvarezl
    Member

    Filed issue to ask about how to best implement trace attribution: Azure/azure-sdk-for-python#48825

    Currently, ARM ID needs to be inferred from Insights endpoint request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

foundryUsage: [Issues, PRs], Target: all Foundry integrationshostingUsage: [Issues, PRs], Target: all hosting related solutionsobservabilityUsage: [Issues, PRs], Target: observability related featurespythonUsage: [Issues, PRs], Target: Python

Type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions