# Logs

The Logs page allows the user to inspect specific logs with certain properties defined by

* A specific time window (default: last 7 full days of data)
* Specific filters on [Columns](https://docs.dbnl.com/v0.30.x/configuration/data-pipeline#columns) or [Metrics](https://docs.dbnl.com/v0.30.x/workflow/metrics) (default: no filters)

{% hint style="info" %}
Typically, the Logs page is visited as part of investigating a specific [Insight](https://docs.dbnl.com/v0.30.x/workflow/insights) or by clicking on part of a chart from a [Dashboard](https://docs.dbnl.com/v0.30.x/workflow/dashboards), in which case the filters and time window will already be applied.
{% endhint %}

Individual Logs can be viewed in a variety of ways:

* [**Detailed View**](#log-detail-view): All [Columns](https://docs.dbnl.com/v0.30.x/configuration/data-pipeline#columns) and [Metrics](https://docs.dbnl.com/v0.30.x/workflow/metrics) of the log viewed together and optionally expanded.
* [**Trace View**](#log-trace-view) (if `spans` provided): The waterfall trace view of latency and timing for each individual span.
* [**Session View**](#log-session-view) (if `session_id` provided): All associated logs for the given session, along with [Metrics](https://docs.dbnl.com/v0.30.x/workflow/metrics).

As part of inspecting the logs the user can

* View the filtered logs as charts and tables in the [Explorer](https://docs.dbnl.com/v0.30.x/workflow/explorer)
* Save the specific filters as a [Segment](https://docs.dbnl.com/v0.30.x/workflow/segments) to publish it on the [Segments Dashboard](https://docs.dbnl.com/v0.30.x/dashboards#segments-dashboard)
* Filter logs by [Experiment Variants](#experiment-filters) to compare different configurations

<figure><img src="https://content.gitbook.com/content/rsm4qOLTbARYHG7ZikPw/blobs/ryJod3kNdJ5ZryFiYjSJ/DBNL-logs.png" alt=""><figcaption></figcaption></figure>

### Experiment Filters

If your data includes the `experiment_variants` column (part of the [DBNL Semantic Convention](https://docs.dbnl.com/v0.30.x/configuration/dbnl-semantic-convention)), you can filter logs by experiment name and variant. The `experiment_variants` column is a map in the form `{ [experiment_name]: experiment_variant }`, for example `{"model": "gpt-4o"}` or `{"model": "gpt-4o-mini", "prompt_version": "v2"}`.

Anywhere a Filter Builder is available (including [Logs](https://docs.dbnl.com/v0.30.x/workflow/logs), [Explorer](https://docs.dbnl.com/v0.30.x/workflow/explorer), and [Segment](https://docs.dbnl.com/v0.30.x/workflow/segments) creation), click **"Add experiment filter"** to add an experiment filter row. Each row allows you to specify:

* **Experiment name**: The name of the experiment (e.g., `model`)
* **Operator**: One of `is`, `is not`, `contains`, or `does not contain`
* **Experiment variant**: The variant value to filter on (e.g., `gpt-4o`)

You can add multiple experiment filters. Like other filters, all rows are ANDed together.

{% hint style="info" %}
Experiment filters can be saved as [Segments](https://docs.dbnl.com/v0.30.x/workflow/segments) to track experiment cohorts over time on the [Segments Dashboard](https://docs.dbnl.com/v0.30.x/dashboards#segments-dashboard).
{% endhint %}

### Log Detail View

All [Columns](https://docs.dbnl.com/v0.30.x/configuration/data-pipeline#columns) and [Metrics](https://docs.dbnl.com/v0.30.x/workflow/metrics) of the log viewed together and optionally expanded.

<figure><img src="https://content.gitbook.com/content/rsm4qOLTbARYHG7ZikPw/blobs/dRjLLNZ4TpKUTHs7ZtDg/DBNL-logs-details.png" alt=""><figcaption></figcaption></figure>

### Log Trace View

The waterfall trace view of latency and timing for each individual span. Only available if `spans` was provided as part of the [DBNL Semantic Convention](https://docs.dbnl.com/v0.30.x/configuration/dbnl-semantic-convention).

<figure><img src="https://content.gitbook.com/content/rsm4qOLTbARYHG7ZikPw/blobs/dsuNakkcIdOxSsQC6npn/DBNL-logs-traces.png" alt=""><figcaption></figcaption></figure>

### Log Session View

All associated logs for the given session, along with [Metrics](https://docs.dbnl.com/v0.30.x/workflow/metrics). Only available if `session_id` was provided as part of the [DBNL Semantic Convention](https://docs.dbnl.com/v0.30.x/configuration/dbnl-semantic-convention).

<figure><img src="https://content.gitbook.com/content/rsm4qOLTbARYHG7ZikPw/blobs/MbQbwaRieatOw1dQDPyL/DBNL-logs-session.png" alt=""><figcaption></figcaption></figure>
