concepts / log-json-schema / events / custom-event

Log JSON Schema - event.custom

Note: Our libraries provide a simple API to log custom events.

The custom event allows you to extend beyond the events already provided by Timber by providing your own custom events.

Example JSON Structure

1
2
3
4
5
6
7
8
9
10
11
{
  "context": {
    "event": {
      "payment_rejected": {
        "amount": 100,
        "customer_id": "abcd1234"
        "error_code": "4623"
      }
    }
  }
}

Notice the payment_rejected key. This is your event type. Each custom event is required to have a single root key that defines it's namespace. This ensures event attributes do not clash names and types.

Using this data

  1. Search it with queries like: payment_rejected.customer_id:abcd1234 or has:payment_rejected.customer_id
  2. Alert on it with threshold based alerts
  3. Graph & visualize it
  4. View this data and context on the log line itself
Questions?

Chat with us, just click the talk button in the bottom right of this page.

Chat with us
Sign Up

Log better and solve problems faster, today. Install in under a minute.

Sign Up