Created
June 19, 2018 18:51
-
-
Save goldylucks/b5f5cf871c7ecfb50fa20657b8bd7037 to your computer and use it in GitHub Desktop.
backtrace crash reporting example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { crashReporter } from 'electron' | |
import bt from 'backtrace-js' | |
import pjson from '../../package.json' | |
export default { initForMain, initForRenderer } | |
const token = '3951a92f3c2901f77b728dfadd9539d6120d3fa23d709ccc7980564dda045004' | |
const endpoint = 'https://zenprotocol.sp.backtrace.io:8443' | |
const attributes = { | |
NODE_ENV: process.env.NODE_ENV, | |
walletVersion: pjson.version, | |
zenNodeVersion: pjson.dependencies['@zen/zen-node'], | |
} | |
function initForMain() { | |
crashReporter.start({ | |
productName: 'ZenProtocol', | |
companyName: 'zenwallet', | |
submitURL: `${endpoint}/post?format=minidump&token=${token}`, | |
uploadToServer: true, | |
extra: attributes, | |
}) | |
} | |
function initForRenderer() { | |
bt.initialize({ | |
endpoint, | |
token, | |
attributes, | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment