concepts / log-json-schema / contexts / custom-context

Log JSON Schema - context.custom

Note: Our libraries provide a simple API to set custom contexts.

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

Example JSON Structure

1
2
3
4
5
6
7
8
9
10
{
  "context": {
    "custom": {
      "application": {
        "id": 1234,
        "name": "ABC Production App"
      }
    }
  }
}

Notice the application key. This is your context type. Each custom context must contain a single root key that creates a namespace. This ensures a clean schema avoiding variable name and type conflicts.

Using this data

  1. Search it with queries like: application.id:1234 or has:application.id
  2. Alert on it with threshold based alerts
  3. Graph & visualize it
  4. Access this data by viewing the log's metadata
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