Skip to main content

Traffic Explorer: connect your log store, set retention and masks, search records

The log store an Environment writes to, its two accounts, template and pipeline, retention and masks, and a record found by path, caller, Route or request id.

By Akif F. Güven Observability

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 with key-auth as in Rate limiting per Consumer, and orders-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 Observability section of the Staging Environment form: Elasticsearch URL http://localhost:9200, Username g8-staging-server, Password Stored with Replace beside it, and under Test connection the line Elasticsearch · Connected · Elasticsearch 8.15.3 · cluster docker-cluster · yellow · 3 indices g8-staging-access-* · Tested 03:12 · stored password; below it the Prometheus URL and the note that log store names carry the environment and follow the slug, Elasticsearch indices g8-staging-access-*, Prometheus label g8_environment="staging" The test names the product, its version, the cluster, its health and how many days of this Environment it already holds. Each test is an audit event.

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 Traffic Explorer Settings page: on the left the Capture section with Request body on and its 8 KB limit, Response body off, and the warning that viewing a body needs the permission for request bodies and is written to the audit log; on the right the Status card: Log store Connected, Version Elasticsearch 8.15.3, Daily index g8-staging-access-2026.10.14, Logger rule Enabled with the link Global rule g8-request-records, Gateway writes to http://elasticsearch:9200 as g8-staging-gateway, Index template Applied, Ingest pipeline Applied The left side is what the gateway stores; the right side is what the store holds. Both rows under the gateway’s address have to read Applied before the records are what this article shows.

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.

The Masking and Retention sections of Traffic Explorer Settings: Request headers authorization, proxy-authorization, cookie, apikey, x-api-key, x-access-token, x-userinfo; Query arguments token, access_token, apikey; Body fields $.params.arguments.requestBody.customer and $.card.number; Retention Keep records for 30 days with a Change button, Last cleanup No cleanup has deleted anything yet, Oldest index g8-staging-access-2026.10.12 · 2 days; on the right Storage 3 daily indices · 1.9 MB and Records 5,100 What is replaced before storage, how long a day lives, and how much the Environment holds right now.

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.

Traffic Explorer with the chip Path /v2/orders and 399 records: GET /v2/orders/ord-10421 rows at 02:48 on 14 October, all 200, with latencies from 4 to 104 ms, the Route orders-v2-api and the Upstream node 172.23.0.30:8080 One chip, 399 records. The same list by Route gives the same 399; the Consumer mobile_app gives 61.

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:

Traffic Explorer with the chip Request ID shop-7f3a and 3 records: GET /v2/orders/ord-10421 200 9 ms on orders-v2-api, GET /orders/ord-10421 200 33 ms on orders-api · mobile_app, and POST /orders/ord-10421 200 70 ms on orders-api · mobile_app, 133 ms apart Three Routes, one header, one search. A client that sends the header gets its whole journey through the gateway back as a list.

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.

A record opened beside the list: GET /v2/orders/ord-10421 200 on orders-v2-api, the Timing bar Total 7 ms with Gateway 1 ms and Upstream 6 ms, and the Overview rows Time, Status, Client IP, Host, Service, Route orders-v2-api · 00000000000000010257, Consumer, Upstream node 172.23.0.30:8080 · 1 attempt, Sizes request 96 B · response 318 B, Gateway node with 3.19.0, x-request-id and Stored in g8-staging-access-2026.10.13 Who asked, which Route took it, which node answered, how long each side took, and which day holds it.

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.

The Request tab of the POST record, scrolled to its end: the last headers x-forwarded-proto http and x-request-id shop-7f3a, Query string 0, and under Body 84 B · application/json the shown JSON with item SKU-4471, qty 2, and under card the number as eight asterisks and the holder A. Demir The body as stored: the field the mask names is gone, the rest is there. The view itself is now in the audit log.

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:

The Related tab of the POST record: 3 records with the same x-request-id within ±5 minutes · span 133 ms, listing the POST and the two GETs with their status and latency The journey from inside one of its steps. A record without the header says so instead.

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.

The audit event Body of a request record viewed: Success, 14 Oct 2026, 03:41:55, the action traffic.body_viewed, the actor nora.becker from a Local sign-in, the target Request record 20261014-094f6cbbd53c1340463201ef81e6cf53 with the link Open request record, the environment staging, and the details bytes 76, part request One event per view, with the record it belongs to. The connection tests of the Environment form are events of the same log.

What to do next

Written by
Akif F. Güven
Engineer, G8
Was this helpful?
Next step

See G8 in a demo

We’ll show you the console with APIs and AI traffic like yours, and answer the questions these articles leave open.

  1. 01Demo
  2. 02Proof of conceptOn Docker for a quick start, or on the infrastructure you plan to run G8 on.
  3. 03LicenseWe prepare a quote for your edition and nodes, and you receive a signed license file.