concepts / log-json-schema / events / http-request-event

Log Event JSON Schema - event.http_request

Note: Our libraries integrate with frameworks and libraries to log this event automatically.

The http_request event is an event defined in our log event JSON schema. It's a structured representation of HTTP request events in your logs.

Example JSON Structure

This:

Started POST /applications

Gets structured into:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{
  "message": "Started POST /application",
  "event": {
    "http_request": {
      "headers": {
        "content-type": "application/json",
        "x-request-id": "2c3a0b24069af49b3de35b8e8c26765c1dba9ff0"
      },
      "host": "api.timber.io",
      "method": "POST",
      "path": "/applications",
      "port": 443,
      "query_string": null,
      "request_id": "2c3a0b24069af49b3de35b8e8c26765c1dba9ff0",
      "scheme": "https"
    }
  }
}

Field descriptions

NameTypeDescription
headersobjectA object containing raw header names and values. optional
hoststringThe host of the destination URL. required, max-length: 255
methodstringThe method of the request normalized to uppercase, ex: GET, POST, etc. required
pathstringThe path of the destination URL. required, max-length: 5000
portnumberThe port of the destination URL. optional
query_stringstringThe query string of the destination URL. optional, max-length: 5000
request_idstringThe unique ID for this outgoing request, useful for request tracing. optional, max-length: 255
schemestringThe scheme of the destination URL, ex: http or https. required

Using this data

Example queries:

  • Search: http_server_request.host:api.timber.io
  • Only this event: is:http_server_request

See our doc on searching.

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