Prerequisite Please see here to get and set your API Key environment variable.
Install the SDK
To get started first download the relevant SDK for your language of choice.Initialize the Logger
Now you can initialize the logger with your API key.Note: If you are in the EU you have to update the 
baseURL on the LytixAsyncLogger to https://eu.api.lytix.co/v2/metrics/async.Start Collecting Logs 🚀
Now you can call OpenAI as you normally would, and logs will automatically get sent to the Lytix platform.Optional Metadata
You can also add metadata to your logs. This can be useful for tracking things like user id’s, session id’s, or other metadata. To do this, you just need to first set the parameters on the logger:Metadata Options
You can set the following metadata fields:- userId: The user id of the user making the request
- sessionId: The session id of the user making the request
- workflowName: The name of the workflow the request was made in
- lytix-metadata-*: Any additional metadata you would like to track, e.g.- lytix-metadata-env:- devwill add the metadata key- envwith the value- dev