1
To get started, install the @helicone/helpers package
2
Set up your Helicone API key in your .env file
Log into Helicone or create an account. Once you have an account, you can generate an API key here.
3
Create a new HeliconeManualLogger instance
4
Log your request
The
logRequest
method takes three parameters:- Request data: What you’re logging (query, operation name, etc.)
- Operation function: The actual work being done
- Headers: Optional custom properties or session tracking
5
Verify your requests in Helicone
With the above setup, any calls to any data operation will automatically be logged and monitored by Helicone. Review them in your Helicone dashboard.
Understanding the Structure
All custom logs follow the same pattern with two parts:Request Data
What you’re about to do. Must include:_type: "data"
- Identifies this as a custom data logname
- A descriptive name for your operation- Any custom fields you want to track (query, endpoint, model, etc.)
Response Data
What happened. Should include:_type: "data"
- Identifies this as a custom data responsename
- Same name as the requeststatus
- Success or error state- Any result data you want to track
More Examples
API Call
ML Model Inference
To learn more about the
HeliconeManualLogger
API, see the API Reference here.