snowplow / snowplow-javascript-tracker

Snowplow event tracker for client-side and server-side JavaScript. Add analytics to your websites, web apps and servers.
http://snowplowanalytics.com
BSD 3-Clause "New" or "Revised" License
555 stars 222 forks source link

Truncate stack when application_error stack trace exceeds 8kb (close #1327) #1328

Closed Jack-Keene closed 4 months ago

Jack-Keene commented 4 months ago

This PR fixes an issue where the stack trace exceeds 8k - causing a failed event on the error tracking.

It uses the 'Blob' API to check the size of the stack trace, and if it exceeds 8kb truncates it using the TextDecoder API.

bundlemon[bot] commented 4 months ago

BundleMon

Files added (6) Status | Path | Size | Limits :------------: | ------------ | :------------: | :------------: :white_check_mark: | libraries/browser-tracker-core/dist/index.mod
ule.js
| +27.31KB | 28KB / +10% :white_check_mark: | trackers/javascript-tracker/dist/sp.js
| +25.43KB | 25.5KB / +10% :white_check_mark: | trackers/javascript-tracker/dist/sp.lite.js
| +15.69KB | 16KB / +10% :white_check_mark: | trackers/browser-tracker/dist/index.umd.min.j
s
| +15.56KB | 16KB / +10% :white_check_mark: | libraries/tracker-core/dist/index.module.js
| +13.36KB | 15KB / +10% :white_check_mark: | trackers/browser-tracker/dist/index.module.js
| +3.51KB | 5KB / +10%

Total files change +100.86KB 0%

Final result: :white_check_mark:

View report in BundleMon website ➡️


Current branch size history