Prerequisite Please see here to get and set your API Key
environment variable.
Install the lytix SDK
(Reccomended) Set you API key via the environment variable
Set your API key in the code
Error Class
You can now just replace all yourraise Exception
calls with raise LError
. For example:

Error Increment
You can also send an error along with related logs without throwing an error by using theincrement
method.