We should improve the documentation for utilising Eventing with Sync Gateway. At present, there is not much information present regarding this use case and the best practices/pit falls/known issues or limitations of such a deployment.
One example of this is that there is no documentation regarding not being able to deploy a source mutating eventing function against a bucket that has Sync Gateway acting upon it. This makes sense since it would cause an infinitely recursive function, however knowing this relies on having detailed product knowledge and is not necessarily intuitive to the end user. Unfortunately, this is not documented anywhere and so if a user tries to do this they will see an error message on the UI, but then no reference as to why this was seen.