Refactored writeZendMonitorCustomEvent signature to provide better testability