Some numbers don't come from events: monthly recurring revenue from your billing system, open support tickets, the status of a build. Insights let your code push those numbers straight to LogZuno, where they appear as tiles with 90 days of history.
Send an insight
POST /v1/insight:
curl -sS -X POST "${LOGZUNO_ENDPOINT:-https://api.logzuno.app/v1}/insight" \
-H "Authorization: Bearer $LOGZUNO_API_KEY" \
-H "Content-Type: application/json" \
-w "\nHTTP %{http_code}\n" \
-d '{
"title": "Open support tickets",
"value": 1,
"change": "increment",
"icon": "🎫"
}'| Field | Required | What it is |
|---|---|---|
title | Yes | The insight's name. The same title updates the same insight |
value | Yes | A number, or a string of up to 255 characters |
change | No | set (default), increment or decrement. Increment and decrement need a number |
prefix, suffix | No | Shown around the value, such as $ or % |
icon | No | One emoji |
LogZuno answers 200 with the new value. Increments are applied in the database in one step, so two servers incrementing at the same moment both count.
Insight calls don't count toward your monthly event allowance. They do count toward the 5 requests a minute per project.
Use them
Add an insight tile to any dashboard. The Insights page lists every insight with its latest value and history.