Skip to content

FoundryAgent telemetry: gen_ai.agent.name defaults to UUID, gen_ai.request.model is "unknown" #5088

Description

@benke520

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)

Image

Expected Telemetry (desired behavior)

Image

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

Activity

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

Metadata

Metadata

Labels

observabilityUsage: [Issues, PRs], Target: observability related featurespythonUsage: [Issues, PRs], Target: Python

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions