crash-reports-client
v0.2.0
Published
Client to connect with Crash reports service API
Downloads
2
Readme
Crash Reports Client
API Key
Node.js (server)
Please use your secret key (or private key) when require for Crash Reports Client SDK
const crashReportsClient = require('crash-reports-client')('sk_a1049168-259a-4762-9dc6-9b030a37130f');
Browser
Browser SDK still in development.
Steps required for integration:
- get your public key (example: pk_a37f8788-17db-4933-bfd1-0939cb446230)
- call the service directly (
POST {host}/api/v1/events
)
Report Types
Log
Arguments:
- description
- payload
- callStack (optional)
await crashReportsClient.createEventLog(
'daily cron executed',
{ dateTime: new Date().toISOString() }
);
Crash
Arguments
- description
- crash severity (consider the available enum)
- payload
- callStack (optional)
await crashReportsClient.createEventCrash(
'random error',
crashReportsClient.SEVERITY.CRITICAL,
{ dateTime: new Date().toISOString() },
new Error().stack
);
Sandbox
Please check the sandbox folder in order to see a full example.