Skip to main content
The Logger SDK allows you to log any custom operation to Helicone - database queries, API calls, ML inference, file processing, or any other operation you want to track.
1
2
3
4
The logRequest method takes three parameters:
  1. Request data: What you’re logging (query, operation name, etc.)
  2. Operation function: The actual work being done
  3. Headers: Optional custom properties or session tracking
5

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 log
  • name - 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 response
  • name - Same name as the request
  • status - Success or error state
  • Any result data you want to track

More Examples

API Call

ML Model Inference

For more examples, check out our GitHub examples.