> ## Documentation Index
> Fetch the complete documentation index at: https://www.botgauge.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Timeline tab

> See when each step of your AI agent's work started, how long it ran, and which step used the most time, tokens, or money, with the BotGauge Timeline.

The Timeline shows when each step of your agent's work started, how long it ran, and which step used the most time, text, or money.

<video src="https://mintcdn.com/botguage/ieyhanX4ZD11axgg/videos/timeline-tab.mp4?fit=max&auto=format&n=ieyhanX4ZD11axgg&q=85&s=af36a4f6fc58a4034aebc937844827c5" poster="/images/observability/timeline-tab-poster.jpg" controls />

A 36-second clip with no sound. It opens a session in Logs, chooses Timeline, finds the slow step, switches to Tokens, then finds a step by name.

## What the Timeline shows

When your agent answers a message, it does several things one after another. It asks a model what to do, uses a tool, then asks the model to write the reply. Each of those is a step, and each step takes some time.

The Timeline draws every step as a bar on a clock. The bar starts where the step started, and its length is how long the step took. A long bar is a slow step. Use it when you want to know:

* Which step took the most time?
* In what order did the steps run?
* Where did the tokens, the text a model reads and writes, go?
* Where did the money go?

> [!NOTE]
>
> New to sessions, turns, and steps? The [Messages tab](https://www.botgauge.com/docs/observability/messages-tab.md) explains those words. In short, a session is a whole conversation, a turn is one user message with the agent's reply, and a step is one thing the agent did while working on it. The Timeline uses the same colors as the other views: red for the session, blue for a turn, teal for a model call, and orange for a tool.

## Open the Timeline tab

**1. Go to Logs**

In the left menu, under **Observability**, choose **Logs**.

**2. Open a row**

Pick a tab, **Sessions**, **Traces**, or **Spans**, and click any row. A panel opens on the right.

**3. Choose Timeline**

At the top of the panel, choose **Timeline**. It is the last of the three tabs, after **Messages** and **Graph view**.

> [!NOTE]
>
> **If the list is empty.** Logs only lists activity from the time range in the button at the top right, which starts at **Last 24 hours**. Open the button and choose a longer range, such as **Last 30 days**, to see older conversations.

## Read the timeline

The left half is the timeline. Each row is one item from the conversation, and the bar on the right of the row shows when it ran. The right half is the same reading area as in the [Messages tab](https://www.botgauge.com/docs/observability/messages-tab.md).

![The Timeline for a five-turn session with callouts on the tab, time ruler, session bar, turn bar, step bar, time label, right half, and arrow](https://mintcdn.com/botguage/ieyhanX4ZD11axgg/images/observability/timeline-overview.jpg?fit=max\&auto=format\&n=ieyhanX4ZD11axgg\&q=85\&s=f0b81202ea9d18ed46c401ead98a5512)

The Timeline for a session with five turns.

1. **Timeline tab.** Messages, Graph view, and Timeline show the same conversation in three ways.
2. **Time ruler.** It starts at 0 and counts up in seconds, here to 30. The dashed lines run down the page so you can line a bar up with a time.
3. **The session bar.** The whole conversation, from its first moment to its last. This one lasted 23 seconds.
4. **A turn bar.** One user message and the agent's reply. The left edge is when it started and the length is how long it took. This turn started about 3 seconds in and ran for 8.2 seconds.
5. **A step bar.** A step inside a turn. This model call ran for 0.51 seconds right at the start of its turn, so its bar is thin.
6. **Time label.** How long the bar ran, in seconds to six decimal places. When a bar starts far to the right, the label sits just to its left.
7. **The right half.** The chat for the session. Click a step and it shows that step's details instead. Click the session row to bring the chat back.
8. **Arrow.** Opens or closes a turn. The first turn starts open and the others start closed.

Rows run from top to bottom in the order the steps started. The empty space between two turn bars is time between replies, when no turn was running. A step that is too short to draw as a bar appears as a thin line.

## Find the slow step

Open a turn with its arrow and compare the bars inside it. The longest bar is where the time went.

![A turn on the Timeline with callouts on the turn, the slowest step, and the quick steps](https://mintcdn.com/botguage/ieyhanX4ZD11axgg/images/observability/timeline-slow-step.jpg?fit=max\&auto=format\&n=ieyhanX4ZD11axgg\&q=85\&s=046730c3662c2d2479c21cd528253c2c)

A turn where one step takes most of the time.

1. **The turn.** The whole reply took 8.2 seconds.
2. **The slowest step.** The last model call, which writes the reply, ran for 6.75 seconds.
3. **The quick steps.** The first model call, the knowledge-base search, and the citation check took 1.21 seconds between them.

Together the four steps run for just under 8 seconds, and the rest of the turn is small gaps between them. The time went to the last model call, not to the lookups. If you wanted a faster reply, that is the step to look at first.

## Switch to tokens or cost

The bars can show other things besides time. Above the timeline, a switch called **Measure bars by** lets you choose **Duration**, **Tokens**, or **Cost**. Tokens are the small pieces of text a model reads and writes. The [Messages tab](https://www.botgauge.com/docs/observability/messages-tab.md#how-to-read-the-numbers) explains them under "How to read the numbers".

### Tokens

![The Timeline measured in tokens with callouts on the switch, the ruler, the session, a turn, a model call, and a step with no tokens](https://mintcdn.com/botguage/ieyhanX4ZD11axgg/images/observability/timeline-tokens.jpg?fit=max\&auto=format\&n=ieyhanX4ZD11axgg\&q=85\&s=556104f7259d2e4681eebb47a533936e)

The same session measured in tokens.

1. **The switch.** Tokens is selected. Choose Duration to go back to time.
2. **The ruler.** It now counts tokens, from 0 up to 8,000, instead of seconds.
3. **The session.** 6,800 tokens in total. The five turns add up to this number.
4. **A turn.** This turn used 1,355 tokens.
5. **A model call.** This call used 987 tokens, input and output together.
6. **A step with no tokens.** Tools are not model calls, so they show 0 tok and a thin line.

> [!WARNING]
>
> The bars no longer show time. In Tokens and Cost, each bar starts where the one before it ended, so the bars add up to the session's total. Their position tells you how much came before, not when it happened. Switch back to Duration to see the clock.

### Cost

Choose **Cost** to see where the money went. It works the same way as Tokens, with dollars on the ruler.

![The Timeline measured in cost with callouts on the switch, the dollar ruler, the session total, and a dash on a tool step](https://mintcdn.com/botguage/ieyhanX4ZD11axgg/images/observability/timeline-cost.jpg?fit=max\&auto=format\&n=ieyhanX4ZD11axgg\&q=85\&s=ebc0ade1ff6bafdf4c5c93acdfa65ff8)

The same session measured in cost.

1. **The switch.** Cost is selected.
2. **The ruler.** It counts dollars.
3. **The session.** The total cost of the conversation.
4. **A dash.** No cost is recorded for this step. Tools show a dash, and model calls carry the cost.

Costs on the timeline are rounded. This session shows $0.018 here, and the exact figure, $0.017720, is in the panel header.

## The toolbar

The strip above the timeline has four controls, from left to right.

![The four controls above the Timeline: Find in trace, Measure bars by, Turns only, and Expand all](https://mintcdn.com/botguage/ieyhanX4ZD11axgg/images/observability/timeline-toolbar.jpg?fit=max\&auto=format\&n=ieyhanX4ZD11axgg\&q=85\&s=64d008af1fc8613a813f77ba77511f53)

The four controls above the timeline.

| Control | What it does |
| - | - |
| **Find in trace** | Type part of a step's name. Press **⌘F** on a Mac, or **Ctrl+F** on Windows, to jump to the box. It searches names, not message text. |
| **Measure bars by** | Duration, Tokens, or Cost, as described above. |
| **Turns only** | Hides the steps and shows only the turns. |
| **Expand all** | The button with arrows pointing up and down. It opens every turn, and then closes them again. Hover over it to see its name, **Expand all** or **Collapse all**. |

![The Timeline with Turns only ticked, showing one row for each reply](https://mintcdn.com/botguage/ieyhanX4ZD11axgg/images/observability/timeline-turns-only.jpg?fit=max\&auto=format\&n=ieyhanX4ZD11axgg\&q=85\&s=544aa3ef60c5484421def67830a0092e)

Turns only shows one row per reply.

1. **Turns only.** Ticked.
2. **One row per reply.** The steps inside each turn are hidden, so you can compare whole replies side by side. Untick the box to bring the steps back.

## Follow a retry

The Timeline also shows what happened when a step failed. Here an agent that was rescheduling a clinic appointment tried a calendar call, which failed, and then tried it again.

![The Timeline showing a retry group containing a failed calendar call and a successful retry](https://mintcdn.com/botguage/ieyhanX4ZD11axgg/images/observability/timeline-retry.jpg?fit=max\&auto=format\&n=ieyhanX4ZD11axgg\&q=85\&s=f3a0e9de4c6d98587ff7936851918369)

A failed call and its retry on the timeline.

1. **The turn.** The whole reply took 4.2 seconds.
2. **The retry group.** `reschedule_with_retry` holds both attempts. Its bar covers both of them, 2.1 seconds in all.
3. **The failed attempt.** Its name is red and its bar is paler. It ran for 1.5 seconds before it failed.
4. **The retry.** It starts after the failed attempt ends and took 0.35 seconds. It worked.

The failed attempt added about 1.5 seconds to the time of the reply, even though the answer was right in the end. Click the failed `calendar_api` row to read its error in the right half. The [Trace Graph](https://www.botgauge.com/docs/observability/trace-graph.md#find-what-went-wrong) shows the same example as boxes.

Open the Timeline in the consoleGo to [BotGauge](https://cloud.botgauge.com), open a session in Observability, Logs, and choose Timeline.

[Try BotGauge →](https://cloud.botgauge.com)

## Common questions

> [accordion] Why are some steps only thin lines?
>
> A very short step is a tiny slice of the whole timeline, so it can't be drawn as a wide bar. It appears as a thin line at the right position. Its time label tells you the exact length.

> [accordion] Why is there empty space between two turn bars?
>
> That space is the time between the end of one turn and the start of the next. No turn was running then, so nothing is drawn. In the sample session each gap is about 0.6 to 0.7 seconds.

> [accordion] Why do tools show 0 tok or a dash?
>
> Tokens and cost belong to model calls. A tool is not a model call, so it shows 0 tok in the Tokens view and a dash in the Cost view. Its time still shows in the Duration view.

> [accordion] Why do the bars look different in Tokens and Cost?
>
> In those views the bars are stacked end to end so that they add up to the total. They no longer show when each step happened. Choose Duration for the clock.

> [accordion] Is the order the same as in the Graph view?
>
> Yes. The Timeline lists steps from top to bottom in the order they started, and the [Graph view](https://www.botgauge.com/docs/observability/trace-graph.md) draws the same steps from left to right in that order.

> [accordion] How do I see what a step received and returned?
>
> Click its row. The right half changes from the chat to that step's details. The [Messages tab](https://www.botgauge.com/docs/observability/messages-tab.md#look-inside-a-step) explains every part of that panel.

The screenshots and the video use the BotGauge sample project, which holds a travel assistant, a shop support agent, an IT helpdesk, and a clinic assistant. The interface can change between releases.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.