> For the complete documentation index, see [llms.txt](https://greymatter.gitbook.io/grey-matter-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://greymatter.gitbook.io/grey-matter-documentation/guides/set-and-modify-sidecar-filters.md).

# Set Sidecar Filters

This guide will help you enable and disable Grey Matter Sidecar filters.

Learn how to configure the **Grey Matter Sidecar in Fabric** to achieve the following:

* Dynamic configuration for adaptive proxying
* Service discovery through the Grey Matter Control API
* Hot reloading of configuration through the Grey Matter Control API

{% hint style="success" %}
The **Grey Matter Sidecar's** **functionality** allows for deep request and response lifecycle observability in your network. We've extended Envoy's filters with in-house Go libraries.
{% endhint %}

## Prerequisites

Successful installation of the following:

* Grey Matter
* Grey Matter Proxy
* Grey Matter Control API

## Step 1: Edit the Sidecar Proxy

To enable filters, you'll need to edit the proxy you've created. The following command will bring up the proxy in your favorite console editor in your shell.

```
greymatter edit proxy proxy-example
```

{% hint style="info" %}
**Note** the two fields: `active_proxy_filters` and `proxy_filters`.
{% endhint %}

### Add Another List Item

In the `active_proxy_filters` array, add another list item.

```javascript
  "active_proxy_filters": [
    "gm.metrics",
    "gm.observables"
  ],
```

{% hint style="danger" %}
Do not save and exit yet.
{% endhint %}

## Step 2: Configure the Observables Filter

So far you've only told Grey Matter Sidecar which filters you want to run, but you have not provided configuration for the observables filter.

### gm\_observables

To configure the observables filter, look under the `proxy_filters` object.

```javascript
    "gm_observables": {
      "emitFullResponse": false,
      "useKafka": false,
      "topic": "proxy-example",
      "eventTopic": "proxy-example-topic",
      "kafkaZKDiscover": false,
      "kafkaServerConnection": ""
    }
```

{% hint style="info" %}
**Note:** the `gm_observables` object. That is where you will configure your new filter.
{% endhint %}

If needed, enable Kafka as a message buffer by specifying`useKafka`, `eventTopic`, and `kafkaServerConnection.`

Learn more about the [Grey Matter Observables](/grey-matter-documentation/usage/fabric/filters/http/gm-observables.md) Filter.

### Save Your Configuration

Once you've edited the configuration to your liking, save the newly modified JSON. The Grey Matter CLI will update your instance of Grey Matter Control API.

Now that you've saved your configuration, proxies with the key `proxy-example` will receive their new configuration and hot reload with the new filter enabled.

## Step 3: Test

To see your new filter in action, tail the logs of the example proxy container with the following command:

```bash
docker logs -f gmfabric_example-proxy_1
```

### Successful Output

If you've tailed the logs correctly, you will see a large JSON output to `stdout` of the container. That is your observable object that provides a looking glass into your request/response lifecycle of the Sidecar.

#### Congratulations

You have successfully created a full running instance of a Grey Matter Fabric, adding an example service, and modified the service using the Grey Matter CLI.

## Questions?

{% hint style="success" %}
**Need configuration help?**

Create an account at [Grey Matter Support](https://support.greymatter.io/support/home) to reach our team.
{% endhint %}
