Instrument an MCP Tool-Use Agent with OpenTelemetry Tracing in TypeScript
A hands-on TypeScript tutorial for making an autonomous, tool-using AI agent observable. You build a small, dependency-light agent loop and wrap it in OpenTelemetry traces — a root span per invocation, child spans for every model call and every MCP tool call, using the gen_ai.* and MCP semantic conventions — then prove the span tree with deterministic, in-memory tests. Runs offline with zero API keys.