Closed fstendardi closed 8 years ago
The use of rg4js('withCustomData', {custom: 'data'}) doesn't work (customData won't be passed during Raygun.send call.
rg4js('withCustomData', {custom: 'data'})
Raygun.send
This happens because of this fragment of code:
var onLoadHandler = function () { if (apiKey) { if (!options) { options = {}; } if (enablePulse) { options.disablePulse = false; } options.from = 'onLoad'; Raygun.init(apiKey, options, null); //(apiKey, options, customData) <---- origin of bug } ... }
see attached screenshot for the Raygun.init fragment that cause the bug.
Raygun.init
customData works fine when using Raygun.send(ex, customData) call.
Raygun.send(ex, customData)
this is my js configuration
<script type="text/javascript"> !function(a,b,c,d,e,f,g,h){a.RaygunObject=e,a[e]=a[e]||function(){ (a[e].o=a[e].o||[]).push(arguments)},f=b.createElement(c),g=b.getElementsByTagName(c)[0], f.async=1,f.src=d,g.parentNode.insertBefore(f,g),h=a.onerror,a.onerror=function(b,c,d,f,g){ h&&h(b,c,d,f,g),g||(g=new Error(b)),a[e].q=a[e].q||[],a[e].q.push({ e:g})}}(window,document,"script","//cdn.raygun.io/raygun4js/raygun.js","rg4js"); </script> <script type="text/javascript"> rg4js('apiKey', 'D+J/vczyDriJrfO5t2RG8w=='); rg4js('enableCrashReporting', true); rg4js('options', { allowInsecureSubmissions: true }); rg4js('setUser', { identifier: 'myid', isAnonymous: false, uuid: '111111' }); rg4js('withCustomData', {custom: 'data'}); //this data won't be passed during Raygun.send call </script>
I'm also having this problem - no custom data going through
Thanks for the reports, this bug is now fixed and going out in the next release (in the above PR) shortly.
The use of
rg4js('withCustomData', {custom: 'data'})
doesn't work (customData won't be passed duringRaygun.send
call.This happens because of this fragment of code:
see attached screenshot for the
Raygun.init
fragment that cause the bug.customData works fine when using
Raygun.send(ex, customData)
call.this is my js configuration