http.request

One request served. A name we suggest, written by you.

FieldValue
Namehttp.request
Severity9 (INFO), or higher when the request failed
Written byNothing. You write it.

When it fires

When you decide. There is no middleware here and no automatic instrumentation of any kind: firstrun never sits in front of a request, and a client that wrapped your handler would be exactly the thing rule seven exists to prevent.

The name and the keys below are in the vocabulary so that two services logging a request spell it the same way and one board reads both. Write it with event() or log() after the response has gone back, so that recording it never delays it.

Attributes

AttributeTypeWhat it holds
http.request.methodstringGET, POST, and the rest.
http.routestringThe route template rather than the resolved path. A resolved path groups into one row per user id; a template groups into one row per endpoint.
http.response.status_codenumberThe status that went back.
url.pathstringThe path that was actually asked for, when you want both.
firstrun.duration_msnumberHow long you took to serve it.

Every entry also carries the resource its client sends once per batch: session.id, user.id once you have called user(), and the rest of the list on the overview. Anything you pass yourself lands in the same map, and your key wins on a collision.

What it never carries

No header, no body, no query string and no client address, unless you put them there yourself. Consider carefully before you do: a server client is covered by your own privacy policy, and an attribute map is a durable place for something a request only needed for a moment.

Questions it answers

A widget is a filter, a group by, an aggregate, a time bucket and a limit. These are those five parts written out, and every one of them is something you can build yourself.

QuestionThe query
Slowest endpointsName is http.request . group by http.route . 95th percentile of firstrun.duration_ms
Error rate by endpointName is http.request . http.response.status_code is at least 500 . group by http.route
Traffic shapeName is http.request . count of entries . bucket by hour
Which methods are used whereName is http.request . group by http.route and http.request.method

See also