Skip to content
LogZuno

Push numbers with the insights API

Push numbers from your code with /v1/insight (set, increment or decrement) and show them on dashboards with 90 days of history.

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": "🎫"
  }'
FieldRequiredWhat it is
titleYesThe insight's name. The same title updates the same insight
valueYesA number, or a string of up to 255 characters
changeNoset (default), increment or decrement. Increment and decrement need a number
prefix, suffixNoShown around the value, such as $ or %
iconNoOne 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.