# JS: Reducing Sealights Logging for Instrumented Code

### Overview <a href="#overview" id="overview"></a>

In certain cases when debugging instrumented FE code, there will be diagnostic info which is output from SeaLights to the Chrome DevTools.

This document describes how to filter that out, so that the DevTools will show only the relevant information.

### Problem <a href="#problem" id="problem"></a>

SeaLights outputs diagnostic information to the Network and Console tabs, which could impact debugging efforts of the instrumented application under test.

### Solution <a href="#solution" id="solution"></a>

The Google Chrome DevTools have some filtering options that allow showing only the relevant requests

#### Hiding output from the Console Tab <a href="#hiding-output-from-the-console-tab" id="hiding-output-from-the-console-tab"></a>

The following image shows all of the events being reported to the console.

<figure><img src="/files/3VHY57hDxUcTVRNSqs83" alt=""><figcaption></figcaption></figure>

To hide a group of events emitting from the same URL, right click the URL and select “Hide messages from URL”:

<figure><img src="/files/TKXyTiG5DLiKIr1dthKz" alt=""><figcaption></figcaption></figure>

Alternatively, type -url:\<URL prefix> in the filter tab at the top of the Console tab (Red). Note the amount of hidden messages displayed on the top right corner (Orange):

<figure><img src="/files/MaSwx8TPO2o9VvV3paih" alt=""><figcaption></figcaption></figure>

#### Hiding output from the Network Tab <a href="#hiding-output-from-the-network-tab" id="hiding-output-from-the-network-tab"></a>

The following image displays all network requests made by our application, note that all of them are SeaLights related. The Filter option marked in red allows to specify rules that allow us to hide these requests:

<figure><img src="/files/rqMyj2ivsuPh0fC77Xa6" alt=""><figcaption></figcaption></figure>

To ignore all messages related to SeaLights, in the Filter box, type in `-domain:sealights.co`.

This will hide all messages related to the [sealights.co](http://sealights.co/) domain.

Once applied, most of the requests are filtered:

<figure><img src="/files/KjJUsWsNItewIZyp6Pux" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
In this specific example, the sample application is also hosted on the [sealights.co](http://sealights.co/) domain.\
This means most requests are filtered out besides static content.
{% endhint %}

For additional information about other filter options, refer to the [official Google Chrome documentation](https://developers.google.com/web/tools/chrome-devtools/network/reference#filter).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sealights.io/knowledgebase/setup-and-configuration/troubleshooting-faq/node-javascript/js-reducing-sealights-logging-for-instrumented-code.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
