# Insights panel

<a id="insights-panel-overview">

## Insights Panel overview

The Insights Panel feature allows to gather, list, and filter business (audit) logs that come from the server. These logs provide a good insight into what is going on internally in your environments. Also, the Insights Panel serves as a useful debugging tool, especially during integration.

Using the Insights Panel feature, you can check logs for the CKEditor Collaboration Services, CKBox, Import/Export to Word, and Export to PDF.\
For Import/Export to Word and for Export to PDF, the Insights Panel feature is available only for the SaaS variant.

<a id="activating-insights-feature">

## Activating Insights feature

By default, the Insights feature is turned off for all environments.

To activate the Insights feature:

1. Log in to the [Cloud Services Portal](https://portal.ckeditor.com/) (Management Panel when using On-Premises). Go to the `Feature configuration` section of the `Cloud environments` tab for the selected environment. Note that the feature is activated separately for every environment.

2. Under the `INSIGHTS` section, switch on the `Business logs` toggle.

3) After turning on the toggle, the CS server will start collecting business and details logs for that environment from now on.

<a id="listing-logs">

## Listing logs

To list the collected logs, go to the `Insights Panel` tab in the Cloud Services Portal (or the Management Panel if using On-Premises). By default, the log list displays business and details logs from the last 2 hours. To change the time range, use the date picker to set the desired filtering range.

<a id="filtering-logs">

## Filtering logs

To search the logs, use the filters to narrow down the desired results.

The currently available filters are:

* `Trace ID` – filtering by `traceId`.
* `User ID` – filtering by `userId`,
* `Error level` – filtering by `warn`, `fail` and `error` levels,
* `Document ID` – filtering by `documentId` – only for the CKEditor Collaboration Services,
* `Asset ID` – filtering by `assetId` – only for the CKBox,
* `Category ID` – filtering by `categoryId` – only for the CKBox,

Filters can be combined with one another.

You can paste the filter value into the filter box (useful for searching by `trace`). It is also possible to choose one of the suggested values - these are aggregated from the logs matching your queries.

<a id="log-structure">

### Log structure

Here are the key fields included in a log:

* `msg` - A detailed log message.
* `traceId` - A unique RPC call ID.
* `data` - An object containing additional information. It may vary between different logs.
* `time` - An occurrence date.
* `tags` - Tags associated with the log. The possible tags are `business` (information about the main action initiated by the user or an API) or `details` (detailed information about the main action or information about additional events that have been triggered by the main action).

An example log:

```json
{
	"msg": "The user authenticated to the server (userId: xhb1jjs10uq8un9wt0vc)",
	"traceId": "b36f1967-7778-4c0d-97a2-37caba24d59e",
	"data": {
	  "socketId": "vem71503nieel8ewoxjb",
	  "environmentId": "ciy6g1w4y1a6qm146our",
	  "userId": "xhb1jjs10uq8un9wt0vc"
	},
	"time": "2022-04-25T09:53:01.257Z",
	"tags": "business"
}
```

Log stream records are grouped together and can contain both `business` and `details` logs linked together by `traceId`. Log details are available after clicking on the log record.

<a id="log-retention">

## Log retention

All logs older than 31 days are periodically removed from the environment for the SaaS variant.\
For the On-Premises variant, the logs are retained for 14 days.

This is done automatically and doesn’t require additional configuration.

---

Full index of the Cloud Services documentation: [llms.txt](../../../llms.txt)
