Objective
Big OTel rock in .NET land. Tribe pattern say: AddXxxInstrumentation() on provider, kill switch env var, separate package. Tribe use ASP.NET Core, Azure SDK, EF Core. Same shape.
Agent Framework today: must wrap each agent by hand with UseOpenTelemetry(). No tribe pattern. No kill switch. No one-line activate.
Need investigate. Not code yet. Lay stone first:
- Where instrumentation live? Core? New
Microsoft.Agents.AI.OpenTelemetry package? Contrib OpenTelemetry.Instrumentation.AgentFramework (open-telemetry tribe own OpenTelemetry.* prefix on nuget, can't take)?
- How activate? DI auto-decorate
AIAgent? Provider builder extension? Both? Idempotent?
- Kill switch env var name?
OTEL_DOTNET_AGENTFRAMEWORK_INSTRUMENTATION_ENABLED?
- Source name rename? Today
Experimental.Microsoft.Agents.AI. Tribe say Microsoft.Agents.AI.
- Workflows source
Microsoft.Agents.AI.Workflows same package?
- Long term: move emit into base
AIAgent BCL ActivitySource listener-driven (like HttpClient)? Skip wrapper?
- Future: contrib package shim post-GA, post-stable gen-AI semconv?
Land ADR with options + decision before any code. Existing ADR 0003 stay. New ADR add on top.
Outcome
ADR docs/decisions/0026-agent-otel-auto-instrumentation.md proposed, reviewed, accepted. Then implementation issue spin off.
Refs
Objective
Big OTel rock in .NET land. Tribe pattern say:
AddXxxInstrumentation()on provider, kill switch env var, separate package. Tribe use ASP.NET Core, Azure SDK, EF Core. Same shape.Agent Framework today: must wrap each agent by hand with
UseOpenTelemetry(). No tribe pattern. No kill switch. No one-line activate.Need investigate. Not code yet. Lay stone first:
Microsoft.Agents.AI.OpenTelemetrypackage? ContribOpenTelemetry.Instrumentation.AgentFramework(open-telemetry tribe ownOpenTelemetry.*prefix on nuget, can't take)?AIAgent? Provider builder extension? Both? Idempotent?OTEL_DOTNET_AGENTFRAMEWORK_INSTRUMENTATION_ENABLED?Experimental.Microsoft.Agents.AI. Tribe sayMicrosoft.Agents.AI.Microsoft.Agents.AI.Workflowssame package?AIAgentBCLActivitySourcelistener-driven (likeHttpClient)? Skip wrapper?Land ADR with options + decision before any code. Existing ADR 0003 stay. New ADR add on top.
Outcome
ADR
docs/decisions/0026-agent-otel-auto-instrumentation.mdproposed, reviewed, accepted. Then implementation issue spin off.Refs
OpenTelemetryAgentwrapper)