addExtraParameter

abstract external fun addExtraParameter(key: String, value: String)(source)

Set an extra parameter to be sent with the crash report. The values specified here will be sent in addition to any values set via the extra option when start was called. Calling this again with the same key replaces the value. The value is read when a crash happens, so you can update it as your app's state changes.

Parameters added in this fashion (or via the extra parameter to crashReporter.start) are specific to the calling process. Adding extra parameters in the main process will not cause those parameters to be sent along with crashes from renderer or other child processes. Similarly, adding extra parameters in a renderer process will not result in those parameters being sent with crashes that occur in other renderer processes or in the main process. Processes created with utilityProcess have no API for setting extra parameters, so only globalExtra values are sent with their crashes.

!NOTE Parameters have limits on the length of the keys and values. Key names must be no longer than 39 bytes, and values must be no longer than 20320 bytes. Keys with names longer than the maximum are ignored, and a warning is emitted. Values longer than the maximum length are truncated.