# Agno traces keep the full message history on tool-heavy runs

> Agno's `setup_tracing()` and `AgentOS(tracing=True)` now give each span room for 1,024 attributes, up from the OpenTelemetry default of 128, unless you set an attribute limit yourself.

- Published: 2026-10-23
- Author: Ashpreet Bedi
- Categories: Changelog
- Canonical: https://www.agno.com/blog/agno-traces-keep-the-full-message-history-on-tool-heavy-runs
- Markdown: https://www.agno.com/blog/agno-traces-keep-the-full-message-history-on-tool-heavy-runs.md

Agno's `setup_tracing()`, which `AgentOS(tracing=True)` also calls, now builds its tracer provider with `SpanLimits(max_span_attributes=1024)`. OpenInference stores each input message on the model span as several attributes, so a run with dozens of tool calls blew past OpenTelemetry's default of 128 and lost its oldest messages first, starting with the user's prompt.

Setting `OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT` or `OTEL_ATTRIBUTE_COUNT_LIMIT` hands the limit back to OpenTelemetry. A `TracerProvider` your app installed itself stays untouched.

We traced an agent driven by a scripted stand-in model that calls a `lookup` tool 40 times, with an in-memory span exporter swapped in for the database exporter, and counted attributes on the final model span:

```python
setup_tracing(db=db)
Agent(model=ScriptedModel(), tools=[lookup]).run("Look up 40 records.")
```

```text
# Before (real output)
attributes on the final model span: 128
input messages on it: 34 of 81
user prompt kept: False

# Now (real output)
attributes on the final model span: 293
input messages on it: 81 of 81
user prompt kept: True

# Now, with OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT=200 (real output)
attributes on the final model span: 200
input messages on it: 55 of 81
user prompt kept: False
```

See the [cookbook](https://github.com/agno-agi/agno/blob/main/cookbook/05_agent_os/13_observability/basic.py), and learn more about [setting up tracing](https://docs.agno.com/tracing/basic-setup) in the documentation.
