Access logs record every request that passes through your environment’s gateway, including online queries and calls to scaling groups and containers. Each record says who called what, how long the request took, and how it ended. Go to the Access Logs page in the dashboard to search them, or to a scaling group’s or container’s detail page to see only its requests.

​
How access logs are produced

The gateway is an Envoy proxy. Envoy writes one access log entry per request, when the request finishes; Envoy’s access logging overview describes the mechanism, and Life of a request covers what happens between a request arriving and its log entry being written.

Envoy writes an entry only for requests that reach the gateway, and only once they finish, which affects three kinds of request:

  • A long-lived stream appears once, when it closes.
  • A request that hangs appears when the client gives up, timestamped at that moment.
  • A request rejected before it reaches the gateway has no access log entry.

​
Reading the default Access Logs chart

The chart above the records on the Access Logs page counts requests in each time window, broken down by outcome: a single classification of how each request ended, derived from its HTTP status, gRPC status and response flags.

OutcomeMeaningExample cause
okThe request succeeded.
client_errorThe server rejected the request because of something the caller sent or assumed.A resource that does not exist, an invalid argument, a bad token.
server_errorThe server or one of its dependencies failed.An internal error, a query deadline exceeded.
proxy_errorThe gateway could not complete the request itself, and recorded why in a response flag.No healthy backend pods, an upstream timeout.
no_responseNo response was sent before the connection ended.The client disconnected while waiting.

Each request takes the first outcome whose rule matches, in this order:

  1. A response flag other than a client disconnect (DC, DR) makes it proxy_error.
  2. A gRPC status decides the rest when one is present: OK is ok, statuses the caller caused are client_error, and the others are server_error.
  3. An HTTP status of 0, meaning no response was sent, is no_response.
  4. Otherwise the HTTP status class decides: 5xx is server_error, 4xx is client_error, and anything else is ok.

To filter by outcome, search for outcome:server_error, or outcome:(server_error OR proxy_error) for several. To see the chart by HTTP status or gRPC status instead, change the group by field in the aggregation row; see Search Aggregations.

​
Status fields

Each record carries three fields that together describe how the request ended. The Outcome column of the record list combines them; add the HTTP Status and gRPC Status columns from the Columns menu. Select a record to open its details.

​
HTTP status

status_code is the HTTP status the gateway sent. A value of 0 means it sent no response at all.

​
gRPC status

grpc_status is the status a gRPC call ended with, such as OK, NOT_FOUND or UNAVAILABLE, and is empty for requests that are not gRPC. gRPC reports its status separately from the HTTP status, and a failed gRPC call still has an HTTP status of 200, as the gRPC protocol requires. Use grpc_status or outcome, not status_code, to find failed gRPC calls.

The gRPC Status column colours each status by severity:

ColourStatuses
GreenOK
GreyCANCELLED
YellowINVALID_ARGUMENT, NOT_FOUND, ALREADY_EXISTS, FAILED_PRECONDITION, OUT_OF_RANGE, UNIMPLEMENTED
OrangeUNAUTHENTICATED, PERMISSION_DENIED, RESOURCE_EXHAUSTED, ABORTED
RedUNKNOWN, DEADLINE_EXCEEDED, INTERNAL, UNAVAILABLE, DATA_LOSS

​
Response flags

response_flags holds Envoy’s own short codes for why a request did not complete normally, and is - when nothing went wrong. Envoy’s command operator reference lists every flag under %RESPONSE_FLAGS%. The ones you are most likely to see:

FlagMeaning
UHNo healthy upstream: every backend pod is failing health checks or gone.
UFThe gateway could not connect to the backend.
UTThe backend did not respond within the route timeout.
UC, URThe backend’s connection closed or reset during the request.
URXRetries were exhausted.
NRNo route matched the request.
DC, DRThe client disconnected or reset before receiving a full response.
RLThe request was rate limited.
UOA circuit breaker rejected the request.

Flags add information the two statuses do not carry. A 503 with UH means no backend pods were available, while a 503 with no flag means the backend itself returned it. The gateway also reports its own failures to gRPC callers as HTTP 200 with UNAVAILABLE, and the flag tells you the gateway produced them.

​
Investigating with access logs

Each of the following pairs a search with a setting of the aggregation row. The full list of searchable fields is in Search Syntax.

​
Find which endpoints are failing

Search outcome:(server_error OR proxy_error) and group by http_path. The table ranks paths by how many failed requests each had.

​
Find slow requests

Choose Percentile of duration at p95 and group by http_path to compare latency across endpoints. The chart shows how each path’s p95 moves over time, and the table ranks the slowest.

To list individual slow requests, search for min_duration:2s in the List view. Duration filters accept us, ms, s and m, and a bare number means milliseconds. A request’s duration is millisecond-precision, measured from when the gateway received the request to when it sent the last byte of the response.

​
Find timeouts and hung backends

Search outcome:no_response OR response_flags:UT OR grpc_status:DEADLINE_EXCEEDED and group by outcome. A rise in no_response alongside rising duration usually means callers are giving up on a slow backend.

​
Check whether one pod is responsible

Search for failed requests and group by upstream_host, the address of the pod that handled each request. If the failures concentrate on one address, the problem is likely confined to that pod.

​
Follow a request to its trace

Open a record to see its details, including its trace ID, or search trace_id:<id> to find every access log entry for one trace. See Tracing for following the request through the engine.