I'm just posting this as an FYI because it took me a while to figure it out.
If you enable the Group By functionality for a custom transformer it will not, by default, expose the group by attributes on the transformer output. I'm not sure why this is the default behaviour because "group by" attributes are always exposed on standard transformers.
Anyway, if you run into this issue, there's a setting under the custom transformer properties to enable this:
> Transformer Parameters > Advanced > Preserve Group By Attributes