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
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.
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.
Add Another List Item
In the active_proxy_filters
array, add another list item.
Do not save and exit yet.
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.
If needed, enable Kafka as a message buffer by specifyinguseKafka
, eventTopic
, and kafkaServerConnection.
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:
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?
Need configuration help?
Last updated
Was this helpful?