-
Notifications
You must be signed in to change notification settings - Fork 650
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Only send JS errors+stats in production [no merge] #1987
Conversation
Load lib if token is given, but only send errors if application is loaded for production. Also removed unnecessary wrapper
@CartoDB/frontend sounds reasonable? |
Sounds good dude 👍 💃 |
@zenitraM @lbosque @santisaez do you have any objections or is there anything I might have overlooked? If everything is OK I would need help from you with the following two tasks:
|
for me it should send stats when we have config for that, doing things in function of rails env gave a lot of problems in the past |
please update news if needed and merge |
Re: rails env that's totally reasonable 👍, I'll make sure to fix it. The reason why it have not been merged yet is because I need help from someone who has admin privileges to staging/production environments and mixpanel to do the necessary changes required by this PR (asked several occasions). I'll get back to this one as soon as I finished the other issues with higher priority related to the new dashboard. Re: update NEWS, will do once this is ready to be merged. |
Based on feedback have done some additional changes. To be able to merge & release this branch I would need the following changes to For staging:
For production: trackjs:
enabled: true Again, the "dev-*_" strings should be created through Mixpanel's dashboard. @matallo It have come to my attention that you might be able to help me with this? ;) For the config changes, can someone of Devops @santisaez @zenitraM @azamorano help me out tomorrow Fri to finish this off finally? |
retest this please |
Frontend tests were OK 👍 (details) |
Only send JS errors+stats in production [no merge]
Fixes #1892
In addition to the minor code change:
TrackJS:
trackAjaxFail: false
since trackJs lib yields a warning that property is not supported anywayapp_config.yml
), but only send errors to trackJs if the config hasenabled
set to true, i.e.:For Mixpanel:
app_config.yml
)Will talk to devops about how to config changes for staging+production environments.
So, effectively we would catch errors at latest in staging, and for devs touching frontend should have the tokens in their dev env
app_config.yml
to catch errors even earlier.edit: removed
Rails.env
usage to load TrackJS