Custom logs and identifying remap rules
In a recent project we worked on, we needed to add a custom log which also had to identify which exactly remap rule triggered. I think this is probably a worthwhile feature to add to ATS (see https://issues.apache.org/jira/browse/TS-2181), but there's an easy way using existing plugins to accomplish this. Using (for example) the header_filter.so standard plugin, you can setup a config for each remap rule that you wish to identify.
map http://www.example.com http://x.example.com @plugin=header_filter.so @pparam=id_a.config
Where id_a.config contains simply
[READ_REQUEST_HDR] @MapID =a_mapping=
In a custom log, you can then log this as
Voila! The trick here is that headers with the @ prefix are considered internal to ATS, and are removed before sending to servers or User-Agents.