feat: [crashReporter] enable compression by default (#25288)
This commit is contained in:
		
					parent
					
						
							
								4484e95fc8
							
						
					
				
			
			
				commit
				
					
						4dc09ea9dc
					
				
			
		
					 5 changed files with 8 additions and 2 deletions
				
			
		|  | @ -59,7 +59,7 @@ The `crashReporter` module has the following methods: | ||||||
|   * `rateLimit` Boolean (optional) _macOS_ _Windows_ - If true, limit the |   * `rateLimit` Boolean (optional) _macOS_ _Windows_ - If true, limit the | ||||||
|     number of crashes uploaded to 1/hour. Default is `false`. |     number of crashes uploaded to 1/hour. Default is `false`. | ||||||
|   * `compress` Boolean (optional) - If true, crash reports will be compressed |   * `compress` Boolean (optional) - If true, crash reports will be compressed | ||||||
|     and uploaded with `Content-Encoding: gzip`. Default is `false`. |     and uploaded with `Content-Encoding: gzip`. Default is `true`. | ||||||
|   * `extra` Record<String, String> (optional) - Extra string key/value |   * `extra` Record<String, String> (optional) - Extra string key/value | ||||||
|     annotations that will be sent along with crash reports that are generated |     annotations that will be sent along with crash reports that are generated | ||||||
|     in the main process. Only string values are supported. Crashes generated in |     in the main process. Only string values are supported. Crashes generated in | ||||||
|  |  | ||||||
|  | @ -13,7 +13,7 @@ class CrashReporter { | ||||||
|       submitURL, |       submitURL, | ||||||
|       uploadToServer = true, |       uploadToServer = true, | ||||||
|       rateLimit = false, |       rateLimit = false, | ||||||
|       compress = false |       compress = true | ||||||
|     } = options || {}; |     } = options || {}; | ||||||
| 
 | 
 | ||||||
|     if (submitURL == null) throw new Error('submitURL is a required option to crashReporter.start'); |     if (submitURL == null) throw new Error('submitURL is a required option to crashReporter.start'); | ||||||
|  |  | ||||||
|  | @ -232,6 +232,7 @@ ifdescribe(!isLinuxOnArm && !process.mas && !process.env.DISABLE_CRASH_REPORTER_ | ||||||
|         await remotely((port: number) => { |         await remotely((port: number) => { | ||||||
|           require('electron').crashReporter.start({ |           require('electron').crashReporter.start({ | ||||||
|             submitURL: `http://127.0.0.1:${port}`, |             submitURL: `http://127.0.0.1:${port}`, | ||||||
|  |             compress: false, | ||||||
|             ignoreSystemCrashHandler: true |             ignoreSystemCrashHandler: true | ||||||
|           }); |           }); | ||||||
|         }, [port]); |         }, [port]); | ||||||
|  | @ -271,6 +272,7 @@ ifdescribe(!isLinuxOnArm && !process.mas && !process.env.DISABLE_CRASH_REPORTER_ | ||||||
|       remotely((port: number) => { |       remotely((port: number) => { | ||||||
|         require('electron').crashReporter.start({ |         require('electron').crashReporter.start({ | ||||||
|           submitURL: `http://127.0.0.1:${port}`, |           submitURL: `http://127.0.0.1:${port}`, | ||||||
|  |           compress: false, | ||||||
|           ignoreSystemCrashHandler: true, |           ignoreSystemCrashHandler: true, | ||||||
|           extra: { longParam: 'a'.repeat(100000) } |           extra: { longParam: 'a'.repeat(100000) } | ||||||
|         }); |         }); | ||||||
|  | @ -287,6 +289,7 @@ ifdescribe(!isLinuxOnArm && !process.mas && !process.env.DISABLE_CRASH_REPORTER_ | ||||||
|       remotely((port: number, kKeyLengthMax: number) => { |       remotely((port: number, kKeyLengthMax: number) => { | ||||||
|         require('electron').crashReporter.start({ |         require('electron').crashReporter.start({ | ||||||
|           submitURL: `http://127.0.0.1:${port}`, |           submitURL: `http://127.0.0.1:${port}`, | ||||||
|  |           compress: false, | ||||||
|           ignoreSystemCrashHandler: true, |           ignoreSystemCrashHandler: true, | ||||||
|           extra: { |           extra: { | ||||||
|             ['a'.repeat(kKeyLengthMax + 10)]: 'value', |             ['a'.repeat(kKeyLengthMax + 10)]: 'value', | ||||||
|  | @ -399,6 +402,7 @@ ifdescribe(!isLinuxOnArm && !process.mas && !process.env.DISABLE_CRASH_REPORTER_ | ||||||
|       await remotely((port: number) => { |       await remotely((port: number) => { | ||||||
|         require('electron').crashReporter.start({ |         require('electron').crashReporter.start({ | ||||||
|           submitURL: `http://127.0.0.1:${port}`, |           submitURL: `http://127.0.0.1:${port}`, | ||||||
|  |           compress: false, | ||||||
|           ignoreSystemCrashHandler: true |           ignoreSystemCrashHandler: true | ||||||
|         }); |         }); | ||||||
|       }, [port]); |       }, [port]); | ||||||
|  |  | ||||||
|  | @ -12,6 +12,7 @@ const addGlobalParam = app.commandLine.getSwitchValue('add-global-param')?.split | ||||||
| crashReporter.start({ | crashReporter.start({ | ||||||
|   productName: 'Zombies', |   productName: 'Zombies', | ||||||
|   companyName: 'Umbrella Corporation', |   companyName: 'Umbrella Corporation', | ||||||
|  |   compress: false, | ||||||
|   uploadToServer, |   uploadToServer, | ||||||
|   submitURL: url, |   submitURL: url, | ||||||
|   ignoreSystemCrashHandler: true, |   ignoreSystemCrashHandler: true, | ||||||
|  |  | ||||||
|  | @ -2,6 +2,7 @@ if (process.platform === 'linux') { | ||||||
|   process.crashReporter.start({ |   process.crashReporter.start({ | ||||||
|     submitURL: process.argv[2], |     submitURL: process.argv[2], | ||||||
|     productName: 'Zombies', |     productName: 'Zombies', | ||||||
|  |     compress: false, | ||||||
|     globalExtra: { |     globalExtra: { | ||||||
|       _version: process.argv[3] |       _version: process.argv[3] | ||||||
|     } |     } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Jeremy Rose
				Jeremy Rose