Trace Capturing
How to capture errors in your code
Prerequisite Please see here to get and set your API Key environment variable.
Install the Lytix NPM package
Trace Capturing
Error Class
You can now just replace all your throw new Error
calls with throw new LError
. For example:
The error, along with the last 20 log lines will automatically get pushed to the lytix platform here
Error Increment
You can also send an error along with related logs without throwing an error by using the increment
method.
Examples
To see all examples please check the Github repo here