What you will have at the end
An Environment whose gateway writes one record per request into an Elasticsearch or OpenSearch you run, under a daily index named after the Environment, and a console that reads those records back: a search by path, client IP, Route, Consumer or the request id header, a record with its headers, timing, body and the records it belongs with, a retention the daily cleanup enforces, and an audit entry for every body anyone opens. The article walks the Staging Environment of the lab install, whose store is Elasticsearch 8.15.3; OpenSearch is connected through the same fields; this article did not connect one.
Prerequisites
- An Elasticsearch or OpenSearch the gateway and the server can both reach, with two accounts in it: one the gateway writes with, one the server reads with. The installation guide creates them and applies the index template and the ingest pipeline the server expects; what they are for is below.
- An Environment with traffic. Here it is Staging, with the Routes of the earlier articles; the records below come from
orders-api, which authenticates its callers withkey-authas in Rate limiting per Consumer, andorders-v2-api. Your first Route builds the same kind of Route from nothing. - A role that may view request records. The screenshots below were taken as
nora.becker, whose role may also view request bodies.
Where the records live
Open Environments, the row menu of the Environment, Edit, and scroll to Observability. The section is optional, and the line under its title says what it is for: where the Environment’s request records and metrics live; the server checks the connection and shows the status, and Traffic Explorer reads the records from the log store. Three fields for the store: Elasticsearch URL, Username, and Password, which reads Stored once saved, with Replace to type a new one. Select Test connection under them:

The grey box under the fields is the naming rule, and it is not editable: the days of an Environment are the indices g8-<slug>-access-<yyyy.mm.dd>, named by their UTC day, and the server reads those and no other. A record made at 02:48 on 14 October in the console’s zone is listed under g8-staging-access-2026.10.13, because that was the day in UTC; the record says so on its Overview.
The account in this form is the server’s. It reads the days of this Environment and deletes a day when the retention says so, and nothing else. The gateway writes with a second account, shown under Traffic Explorer › Settings, that may add records to those days and may not read one: its password is part of the gateway’s configuration, so whoever can read the global rules can obtain it, and the installation guide gives it the narrowest role the store allows. A store with a certificate from your own CA needs that CA in the Environment’s CA certificates, the same bundle the Environment uses for its other HTTPS connections.
The template and the pipeline
Traffic Explorer › Settings has a Status card on the right. It says what the store holds for this Environment: the connection, the version, today’s Daily index, the Logger rule that makes the gateway write, the address and account the gateway writes with, and two rows, Index template and Ingest pipeline, each Applied.

The installation guide applies both with two requests to the store, byte for byte as the server holds them, and this is what they do:
- The index template matches
g8-*-access-*, fixes the type of every field of a request record before the first record arrives, so a client address is an address and a status a number, sets one shard with a replica when the cluster has a second node, and names the ingest pipeline as the default for every day born under it. - The ingest pipeline stores each record under its request id. The gateway sends records in batches and sends a batch again when the store answered late; under the request id the second copy replaces the first instead of adding a record. The Status card says it in one sentence: the days born under the current template store each record under their request id.
Neither of them masks anything. Masking happens on the gateway, before the record leaves it, under the lists in the Masking section of the same page; Masking tokens and card numbers is the article for those lists, and this one only shows the masks at work in a record below.
Capture and retention
Capture decides whether bodies are stored: Request body on, up to 8 KB, when the body is JSON; Response body off, so records carry response headers and sizes only. Retention is one number, Keep records for, 30 days here; Change opens a dialog that takes 1 to 30 days and says what the number does: records older than it are deleted at the next daily cleanup. Last cleanup reads “No cleanup has deleted anything yet” on this Environment, and Oldest index names the day that would go first, two days old at the time of writing, so the cleanup has had nothing to delete, and no deletion event is shown here. A deletion is recorded by the system as its own event, naming the day; a change of the number is an event too.

Searching the records
Explorer lists the Environment’s records, newest first, over a window that opens at the last 24 hours, with the status classes as one-click filters. The search box takes a path, a client IP, a request id, a Route, a Service or a Consumer, and offers what it understood as you type: orders-v2 offers Route orders-v2-api, Upstream orders-v2, Path contains “orders-v2” and Request ID is orders-v2; mobile offers Consumer mobile_app; an address offers Client IP is. Each choice becomes a chip over the list and a parameter in the address, so a search is a link you can send.

The request id in that list is the x-request-id header a client sends, and it is what ties records together. Three requests were sent with the header X-Request-Id: shop-7f3a: a POST with a JSON body to /orders/ord-10421 as the Consumer mobile_app, a GET to the same path, and a GET to /v2/orders/ord-10421:

The record’s own id, the one in a record’s address and in Stored in, is not what this search reads; a record is reached by its link, which the audit log also carries.
One kind of record is there without anyone sending it: the console checks that the data plane answers by asking the gateway for /, and each ask is a record, 404, no route matched, answered by the gateway. The Environment’s Overview page asks every thirty seconds while it is open; the Environments list and the Environment form ask once when they open. Over the last day Staging, whose Overview stayed open in a browser for hours, holds 1,258 of them; Sandbox, whose Overview was opened now and then, holds eight. A search by path or Route leaves them out.
A record
A row opens the record beside the list. Overview has the timing bar, total, gateway and upstream, and the facts: the time with its zone, the status, the client IP, the host, the Service and the Route with its id, the Consumer, the Upstream node that answered with the number of attempts, the sizes, the Gateway node with the engine version it runs, the x-request-id, and Stored in, the day’s index. Copy as cURL rebuilds the request.

Request lists the headers as stored; the apikey header of the POST reads ******** with the note that the gateway masked it before it was stored. Under Body, 84 bytes of JSON and a Show body button with the sentence that viewing a body is written to the audit log. Shown, the body is the one the client sent, with one difference: the card number under $.card.number, a path in the Masking list, is ******** too.

Response lists the response headers and the body’s size and type, and says that this record carries no response body, because response capture is off. Related finds the records with the same x-request-id within five minutes either way:

Who may look, and what the audit log keeps
Request records are open to the administrators of an Environment and to any role that carries Traffic Explorer · view. Opening a body is a second permission, for request bodies, and a role can read every record of an Environment without it. Every body shown is an audit event, traffic.body_viewed, labelled “Body of a request record viewed”: the actor, the time, the record as the target with a link to it, and the part and size that were shown. The size is 76 bytes for a body the record lists as 84: the card number, sixteen digits as sent, is eight asterisks as stored.

What to do next
- Decide what never reaches the store: Masking tokens and card numbers in request records and logs.
- Put the counts beside the records: Connect Prometheus to an Environment; be told when they cross a line: Alerts on error rate and response time, whose episode page links straight to the 5xx records of the Route.
- Send a record per request to your own stores as well: Access logs to Elasticsearch, syslog and HTTP.
- Why the records live in your own store: Why G8, the section on analytics and records in your own data stores; the supported versions and the retention in the Deployment and Security Brief.