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

Log JSON Schema - context.http

Note: This context is automatically added to your logs through our libraries

The http context adds HTTP data within the context of a HTTP request. Any log line written within a single HTTP request will share this context data.

Example JSON Structure

1
2
3
4
5
6
7
8
9
10
{
  "context": {
    "http": {
      "method": "GET",
      "path": "/welcome",
      "remote_addr": "123.34.32.123",
      "request_id": "2c3a0b24069af49b3de35b8e8c26765c1dba9ff0"
    }
  }
}

Field descriptions

NameTypeDescription
context.http.methodstringThe request method normalized to uppercase, ex: GET, POST, PUT, DELETE, etc. required
context.http.pathstringThe request path. required, max-length: 5000
context.http.remote_addressstringThe ipv4 or ipv6 address of the original requestor. optional
context.http.request_idstringThe unique ID of this request, useful for request tracing. optional, max-length: 255

Using this data

  1. Search it with queries like: http.request_id:2c3a0b24069af49b3d or has:http.request_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