Phase 14: Agent Engineering

OpenTelemetry GenAI Semantic Conventions

OpenTelemetry's GenAI SIG (launched April 2024) defines the standard schema for agent telemetry. Span names, attributes, and content-capture rules converge across vendors so agent traces mean the same thing in Datadog, Grafana, Jaeger, and Honeycomb. Name the GenAI span categories: model/client, agent, tool. Distinguish invokeagent CLIENT vs INTERNAL spans and when each applies. List the top-level GenAI attributes: provider name, request model, data-source ID. Explain the content-capture contract: opt-in, OTELSEMCONVSTABILITYOPTIN, external-reference recommendation. Every vendor invents their own span names. Ops teams end up building per-framework dashboards. OpenTelemetry's GenAI SIG fixes this by defining one standard the whole ecosystem targets. Model / client spans. Cover raw LLM calls. Emitted by provider SDKs (Anthropic, OpenAI, Bedrock) and framework model adapters. Agent spans. createagent (when the agent is constructed) and invokeagent (when it runs). Tool spans. One per tool invocation; connected to the agent span by parent-child relation. Span name: invokeagent {genai.agent.name} if named; fallback to invokeagent. Span kind:. CLIENT — for remote agent services (OpenAI Assistants API, Bedrock Agents). INTERNAL — for in-process agent frameworks (LangChain, CrewAI, local ReAct). genai.provider.name — anthropic, openai, aws.bedrock, google.vertex. genai.request.model — the model ID. genai.response.model — the resolved model (may differ from request due to routing). genai.agent.name — agent identifier. genai.operation.name — chat, completion, invokeagent, toolcall. genai.datasource.id — for RAG: which corpus or store was consulted.…

OpenTelemetry GenAI Semantic Conventions: OpenTelemetry's GenAI SIG (launched April 2024) defines the standard schema for agent telemetry. Span names,…

This free lesson is part of the AI Engineering from Scratch curriculum. Read the full explanation, run the lesson code, and verify the result in the interactive reader or from the repository source.

Browse the complete course catalog or open this lesson on GitHub.