You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: LangGraph agents in Foundry Hosted agents are not emitting gen_ai.agent.* metadata #225
LangGraph/LangChain agents that are being run inside Microsoft Foundry as Hosted agents are not emitting Agent name, version and id in the right fields.
Instead of emitting them in the fields dictated by OTel GenAI Semconv. Instead of these fields:
changed the title [-][Bug]: LangGraph agent in Foundry Hosted agents not emitting gen_ai.agent.* metadata[/-][+][Bug]: LangGraph agents in Foundry Hosted agents are not emitting gen_ai.agent.* metadata[/+]on Jul 16, 2026
shivam mamgain (@shivamMg) I think I know what is wrong here, in your sample when you invoke the microsoft distro, you pass the agent_id, name and description as config parameters to the distro instead of passing it in the instrumentation options for langchain -
You should instead be passing these values as follows -
use_microsoft_opentelemetry(
enable_azure_monitor=True,
sampling_ratio=1.0,
instrumentation_options={
"langchain": {
"enabled": True,
# Optional: set static agent identity on all LangChain spans.
# These appear as gen_ai.agent.* attributes in your telemetry.
# If omitted, agent_name is inferred from LangChain's
# runtime metadata when available.
agent_name=os.getenv("AGENT_NAME", "retail-agent-langgraph"),
agent_version=os.getenv("AGENT_VERSION"),
agent_id=os.getenv("AGENT_ID"),
},
},
enable_sensitive_data=True,
)
Please try out the correct format and let us know if the issue persists.
Activity
[-][Bug]: LangGraph agent in Foundry Hosted agents not emitting gen_ai.agent.* metadata[/-][+][Bug]: LangGraph agents in Foundry Hosted agents are not emitting gen_ai.agent.* metadata[/+]github-actions commentedon Jul 16, 2026
cc Hector Hernandez (@hectorhdzg) Jackson Weber (@JacksonWeber) Leighton Chen (@lzchen) Nev (@MSNev) Radhika Gupta (@rads-1996) Jeremy Voss (@jeremydvoss) Nagkumar Arkalgud (@nagkumar91)
rads-1996 commentedon Jul 16, 2026
shivam mamgain (@shivamMg) I think I know what is wrong here, in your sample when you invoke the microsoft distro, you pass the
agent_id, name and descriptionas config parameters to the distro instead of passing it in the instrumentation options for langchain -You should instead be passing these values as follows -
Please try out the correct format and let us know if the issue persists.
github-actions commentedon Jul 16, 2026
shivam mamgain (@shivamMg) we need more information before we can continue working on this issue.
Please reply within 14 days. If we do not hear back, this issue may be closed automatically.
Marked as needs-author-feedback on 2026-07-16.
github-actions commentedon Jul 24, 2026
shivam mamgain (@shivamMg) friendly reminder: we are still waiting for your feedback.
If we do not hear back within 7 more days, this issue may be closed automatically.
github-actions commentedon Jul 31, 2026
shivam mamgain (@shivamMg) we have not received the requested information within 14 days, so we are closing this issue for now.
If you still need help, please comment with the requested details and we can reopen it.