I didn't implement the fluentd piece, but I can point you at the PR that did just that for our fork of the gcloud-pubsub plugin:
One comment I can make (from my own perspective, of course) is that we would normally upstream these changes, but fluentd tends to have a problem with a variety of different packages for the same thing, and no clear official choice.
That means it's difficult to know where to put your efforts, and can lead to individuals forking plugins like we have as we don't know where to focus the upstream efforts.
We didn't try too hard, truth be told, but thought it was worth mentioning.
Thanks for all your efforts on fluentd!