EnvoyFilter config system and debugging

It may be more obvious to folks familiar with envoy but I’m finding it very difficult to understand how to define an EnvoyFilter because I don’t know what the original config is that I’m trying to patch.

For example, I can view the envoy config of a specific pod via istioctl dashboard envoy pod/foo and look at the json in the web ui. However that config is humongous, doesn’t have an obvious structure, and definitely doesn’t directly match the structure of an EnvoyFilter.

There are abstractions in istio like HTTP_FILTER, CLUSTER, etc for applyTo and a match context and a patch operation - but I’ve had a heck of a time viewing the existing values for an HTTP_FILTER to know what I’m inserting / merging with.

Any tips or docs or commands I’m missing here?