Observing CrewAI with OpenTelemetry means mapping its Crew, Agent and Task objects to spans over OTLP, so each agent's reasoning, tool calls and token cost are visible, and a runaway multi-agent workflow is something you can see and stop..
Observing CrewAI with OpenTelemetry means mapping its Crew, Agent and Task objects to spans over OTLP, so each agent's reasoning, tool calls and token cost are visible, and a runaway multi-agent workflow is something you can see and stop.
A CrewAI workflow is a crew of agents collaborating on tasks, and its behaviour is only intelligible if you can see the structure: a span for the crew run, a span per agent and per task, and, inside each, the LLM calls, tool calls and handoffs. The signals that matter are tokens and cost per agent (multi-agent workflows can be expensive because each agent calls a model), task duration and success, and, critically, the number of steps an agent takes, because a common failure mode is an agent looping and re-calling the model without converging.
OpenTelemetry has emerging GenAI semantic conventions for LLM and agent spans, and libraries such as OpenLLMetry and OpenInference instrument the popular frameworks to emit them, with token, model and cost attributes, over OTLP. Mapping CrewAI's Crew, Agent and Task objects to spans gives you the hierarchy, and the LLM instrumentation underneath captures the token and cost attributes per call. One CrewAI-specific detail: the framework emits its own anonymous usage telemetry, which you should tell apart from your application tracing, instrument your own spans deliberately so your observability reflects your workflow, not the framework's internal metrics.
The signals that explain most multi-agent incidents:
| Signal | Source | What it tells you / watch for |
|---|---|---|
gen_ai.usage tokens per agent | LLM instrumentation | Tokens and cost attributed to each agent; multi-agent runs multiply cost, so per-agent visibility matters. |
steps per agent / per crew run | CrewAI instrumentation | The number of reasoning steps; a rising count is the signature of an agent looping without converging. |
task span duration and status | CrewAI instrumentation | How long each task takes and whether it succeeded; a stuck task stalls the whole crew. |
tool call duration and errors | tool instrumentation | Latency and failures of tools agents call; a failing tool sends an agent into retries. |
gen_ai.client.operation.duration | LLM instrumentation | Model call latency per agent step. |
total cost per crew run | derived | Tokens across all agents mapped to price; the number that decides whether a workflow is affordable. |
A CrewAI dashboard should surface cost and loops first. Row one: total cost per crew run and tokens per agent, so an expensive agent is obvious. Row two: steps per agent over time (the runaway-loop detector) and task duration and success rate. Row three: tool call latency and errors, since a failing tool is a frequent cause of agents spinning.
# cost per crew run (multi-agent runs add up fast)
sum(gen_ai.usage.input_tokens * price_in + gen_ai.usage.output_tokens * price_out) by (crew.run_id)
# steps per agent: an outlier is a runaway loop
max(agent.step.count) by (agent.name, crew.run_id)
# tool failures driving agent retries
rate(tool.call{result="error"}[5m]) by (tool.name)
Cost and latency for a crew run spike because an agent keeps reasoning and re-calling the model without reaching a conclusion. The step count for that agent is far above normal. Bound agent iterations, improve the task definition, or add a stopping condition; the step-count metric catches it before the bill does.
A workflow that seemed cheap in testing is expensive in production because every agent calls a model and the tokens multiply. Per-agent token attribution shows which agent dominates cost, so you can trim its prompts, reduce its context, or consolidate agents.
One task stalls, and because agents depend on each other, the whole crew stops making progress. Task duration and status pinpoint the blocked task, and the tool and LLM spans inside it show whether a failing tool or a model error is the cause.
Starting thresholds to tune:
| Condition | Signal | Meaning |
|---|---|---|
| steps per agent > baseline x2 | loop | An agent is looping without converging. |
| cost per crew run > budget | cost | A workflow is more expensive than intended. |
| task failure rate rising | reliability | Tasks are failing and stalling the crew. |
| tool error rate > threshold | tools | A tool agents depend on is failing. |
Ops Singularity's AI/ML and Agent Ops pillar operates multi-agent systems in production, ingesting this OpenTelemetry data, watching per-agent cost and step counts, and taking governed action, bounding a runaway agent, escalating a stuck crew, when a workflow degrades. Explore AI/ML and Agent Ops.
Yes. CrewAI's Crew, Agent and Task objects map to OpenTelemetry spans, and LLM instrumentation captures token and cost attributes, so a multi-agent workflow becomes a single trace over OTLP.
Track the number of reasoning steps per agent per run. A step count far above the normal baseline is the signature of an agent looping without converging, before it inflates cost.
Capture prompt and completion tokens per call as gen_ai.usage attributes and multiply by the model's price. Because the tokens are on every span, cost rolls up per model, per feature and per request.
Bring a real incident. We will show you Sentinel investigate, act and verify end to end, with every action reversible and audited.