Set Sidecar Filters
This guide will help you enable and disable Grey Matter Sidecar filters.
Last updated
Was this helpful?
This guide will help you enable and disable Grey Matter Sidecar filters.
Last updated
Was this helpful?
Was this helpful?
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.
Successful installation of the following:
Grey Matter
Grey Matter Proxy
Grey Matter Control API
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
In the active_proxy_filters
array, add another list item.
"active_proxy_filters": [
"gm.metrics",
"gm.observables"
],
Do not save and exit yet.
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.
To configure the observables filter, look under the proxy_filters
object.
"gm_observables": {
"emitFullResponse": false,
"useKafka": false,
"topic": "proxy-example",
"eventTopic": "proxy-example-topic",
"kafkaZKDiscover": false,
"kafkaServerConnection": ""
}
If needed, enable Kafka as a message buffer by specifyinguseKafka
, eventTopic
, and kafkaServerConnection.
Learn more about the Grey Matter Observables Filter.
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.
To see your new filter in action, tail the logs of the example proxy container with the following command:
docker logs -f gmfabric_example-proxy_1
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.
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.
Need configuration help?
Create an account at Grey Matter Support to reach our team.