18F / analytics-reporter

Lightweight analytics reporting and publishing tool for Digital Analytics Program's Google Analytics 360 data.

Home Page:https://analytics.usa.gov/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Investigate realtime reports occasionally logging errors in reporter

levinmr opened this issue · comments

After logging improvements were made recently, an intermittent error has been recorded with the realtime reports. Investigate this error, determine the LOE to fix, and implement the fix if the LOE is small.

15:26:14.740: [APP/PROC/WEB.0] info: [realtime.sh]
15:26:14.740: [APP/PROC/WEB.0] error: debug: [top-pages-realtime] Fetching...
15:26:15.098: [APP/PROC/WEB.0] info: [realtime.sh]
15:26:15.098: [APP/PROC/WEB.0] error: debug: [top-pages-realtime] Saving report data...
15:26:15.099: [APP/PROC/WEB.0] info: [realtime.sh]
15:26:15.099: [APP/PROC/WEB.0] error: error: [top-pages-realtime]  Converting circular structure to JSON
15:26:15.099: [APP/PROC/WEB.0]     --> starting at object with constructor 'Object'
15:26:15.099: [APP/PROC/WEB.0]     --- property 'totals' closes the circle {"stack":"TypeError: Converting circular structure to JSON\n    --> starting at object with constructor 'Object'\n    --- property 'totals' closes the circle\n    at JSON.stringify (<anonymous>)\n    at _formatJSON (/home/vcap/app/src/process-results/result-formatter.js:22:31)\n    at Object.formatResult (/home/vcap/app/src/process-results/result-formatter.js:8:14)\n    at /home/vcap/app/index.js:60:28\n    at async Promise.each (/home/vcap/app/index.js:10:27)"}