Description
FoundryAgent has two telemetry gaps:
1. gen_ai.agent.name shows a UUID instead of the agent name
When name is not explicitly passed, the telemetry layer reports the auto-generated id (a UUID).
FoundryAgent already has agent_name — it should default name = agent_name when not set.
2. gen_ai.request.model shows "unknown"
The model is defined on the Foundry agent definition server-side, but FoundryAgent doesn't fetch or cache it. Since AIProjectClient is already available, the model name could be resolved from the agent definition at init or lazily from the first response.
Actual Telemetry (problem)
Expected Telemetry (desired behavior)
Workaround
Manually pass both values:
agent = FoundryAgent(
agent_name="WeatherAgent",
agent_version="3",
name="WeatherAgent", # ← fixes gen_ai.agent.name
default_options={"model": "gpt-5.4"}, # ← fixes gen_ai.request.model
...
)
Expected Behavior
name should default to agent_name when not explicitly provided
gen_ai.request.model should be auto-populated from the Foundry agent definition
Environment
- agent-framework: 1.0.0
- agent-framework-foundry: 1.0.0
- Python: 3.10
- OS: Windows
Description
FoundryAgenthas two telemetry gaps:1.
gen_ai.agent.nameshows a UUID instead of the agent nameWhen
nameis not explicitly passed, the telemetry layer reports the auto-generatedid(a UUID).FoundryAgentalready hasagent_name— it should defaultname = agent_namewhen not set.2.
gen_ai.request.modelshows "unknown"The model is defined on the Foundry agent definition server-side, but
FoundryAgentdoesn't fetch or cache it. SinceAIProjectClientis already available, the model name could be resolved from the agent definition at init or lazily from the first response.Actual Telemetry (problem)
Expected Telemetry (desired behavior)
Workaround
Manually pass both values:
Expected Behavior
nameshould default toagent_namewhen not explicitly providedgen_ai.request.modelshould be auto-populated from the Foundry agent definitionEnvironment