What you will have at the end
An Environment whose Analytics reads from a Prometheus you run: request counts by status class, p50 and p95, the busiest Routes, and the changes from the audit log drawn into the same window. And the proof the site promises: the Analytics card for a window and a Prometheus query for the same window, side by side, with the same number. The article also says what “the first samples of a new series are not counted” means in practice, with the example from the circuit-breaker article.
Prerequisites
- A Prometheus that scrapes the gateway cluster’s metrics endpoint and puts the Environment’s label on the series. The lab’s scrapes each cluster with a static label,
g8_environment, set to the Environment’s slug; the Environment form shows the exact label it will read. - A role that may manage Environments, and some traffic. The screenshots below were taken as
nora.becker, on Staging and on Sandbox.
The URL and the test
Open Environments, the Environment’s menu, Edit, and under Observability fill Prometheus URL. Test connection asks the Prometheus for its version and for one series under the Environment’s label:

A Prometheus that answers but holds no series under the label is reported as connected with “no series labelled … yet”, in amber, which is what a fresh Environment shows until its first scrape; Add your first Environment has that screenshot. Save environment.
What Analytics shows
Analytics in the Environment’s navigation, for the last 24 hours:

Below it, the response times as the client sees them and as the backends took them, estimated from the histogram buckets the gateway publishes:

The lists: the Routes with the most requests, the most 5xx and the slowest, and the same three for Services and Upstreams.

And the card that ties the numbers to the people: Changes in this window, the audit records of the window, which the request chart also draws as markers.

The same window in Prometheus
The Sandbox Environment is small enough to count by hand. Its Requests card for the last 24 hours:

The Prometheus itself, asked for the increase of the gateway’s request counter over the same 24 hours under the Sandbox label, by status code:

The fractions after the decimal point are Prometheus’s own extrapolation at the window’s edges, which is the “estimate” the chart note talks about; the card rounds them to whole requests.
What is not counted, and why
Code 200 reads zero in both places, and Your first Route sent six 200s on this Environment, in two new series: one without a Consumer from before the Plugins, at 1, and five as mobile_app, first scraped at 5. Each was the first sample of its series: a counter that is born inside the window has no earlier value to increase from, so Prometheus’s increase over the window, and therefore Analytics, leaves those first samples out. The same thing made the breaker’s two 503s invisible in A failing backend out of rotation. In practice: the requests in the first scrape of a new series, a Route’s first requests or the first answers with a status code it has not given before, are in Traffic Explorer and never in Analytics. The records are the complete list; Analytics is the rate.
What to do next
- Put the request records beside the counts: Traffic Explorer: connect your log store, set retention and masks, search records.
- Be told when the 5xx share or the p95 crosses a line: Alerts on error rate and response time.
- Why the numbers live in your own stores: Why G8; the versions and retention in the Deployment and Security Brief.