Custom Events
Appart from the reserved pre-defined events, you can also define your own events revelant to your business and be captured to correlate with your LLM messages and threads to measure your product performance.
Custom events allow you to track any user interevents with your LLM application by sending numeric metrics and capturing additional details about the event. You can defined any name for the event on event_type
field, and any metric names you want on metrics
with numeric values, plus any extra details you want to capture on event_details
with string values, just keep them consistent to be able to visualize on the dashboard, where you can customize the display later on.
REST API Specification
Endpoint
POST /api/track_event
Headers
X-Auth-Token
: Your LangWatch API key.
Request Body
Example
You can send any event type with corresponding numeric metrics and string details. This flexibility allows you to tailor event tracking to your specific needs.
On the dashboard, you can visualize the tracked events on the “Events” tab when opening the trace details.