Prerequisite Please see here to get and set your API Key environment variable.
Error Capturing
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.
Fast API Integration
Lytix also supports capturing errors in FastAPI. To get started first hook up our Lytix middleware:Examples
To see all examples please check the Github repo hereLLM Model Input Output Collection
Lytix supports automatically collecting the input and output of LLM models. To do this you can use the followingLLM Model Trace Collection
Lytix also supports capturing trace information (e.g. duration) for the LLM model. To do this you can use the following
LLM Model Logs Collection
Similar to traces, we can also capture logs when a model is called. This will auto push the logs to the Lytix platform and associated with this trace
Model IO event with associated logs
Manual Metric Collection
You always have the option to manually push metrics to the Lytix platform with custom names and metadata. The following example pushes a metric to the Lytix platform with the nametestMetic
and the value 1
along with the env: prod
metadata.
