Skip to content

Commit d170a61

Browse files
authored
Fix outdated ingestion pipeline docs (#903)
* Fix outdated live ping tables description in pipeline overview The Decoded topic is read by the Kubernetes Live Sink (part of the ingestion-sink service on GKE), not a Dataflow job. Update the prose and relabel the diagram node accordingly. Also drop the inaccurate 'guaranteed to contain a few days of history' caveat: live tables are for low-latency access to recent data, not a supported analysis interface. Point readers to the stable tables instead. * Fix outdated Landfill sink description in pipeline overview The Raw topic is read by the Kubernetes Raw Sink (part of the ingestion-sink service), not a Dataflow job, and writes to the payload_bytes_raw dataset. The 'Landfill' name is historical. Update the prose and relabel the diagram nodes; keep a parenthetical for the old name. Match gcp-ingestion's own terminology ('Kubernetes Raw Sink job') rather than the stale 'custom Java application' phrasing from a 2020 transition note. * Fix outdated edge server behavior in HTTP edge spec Verified against gcp-ingestion ingestion-edge (create_app.py, publish.py, util.py, dockerflow.py): - GET /status does not exist. Health is served via Dockerflow endpoints (/__lbheartbeat__, /__heartbeat__, /__version__). Rewrite the GET request and response-code sections accordingly. - The ?v=4 query parameter is not validated or rejected at the edge; the edge routes on path only and forwards the body opaquely. Describe the actual behavior. - POST/PUT response codes: add 431 (attribute exceeds PubSub's 1024-byte limit) and 507 (local retry queue full), which the edge actually returns; drop 411 and 414, which are not enforced. - Define the previously dangling [decoder] and [schemas repository] reference-style links. * Fix outdated transform location in schemas doc Verified against gcp-ingestion: ingestion-beam's PubsubMessageToTableRow is now a thin wrapper that adds Beam metrics and converts to a BigQuery TableRow; the transformation logic (map types, nested arrays, tuples, coercion, additional_properties) moved to ingestion-core's PubsubMessageToObjectNode. Point the doc there and fix the 'Thee'/'telemtry' typos in the paragraph.
1 parent bdaa3fa commit d170a61

4 files changed

Lines changed: 41 additions & 22 deletions

File tree

.spelling

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ DNS
117117
DNSSEC
118118
docs.telemetry.mozilla.org
119119
Dockerfile
120+
Dockerflow
120121
dropdown
121122
DSRE
122123
DTMO

src/concepts/pipeline/gcp_data_pipeline.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ graph TD
1616
1717
f1(fa:fa-firefox Firefox) -->|HTTP Post| d0(fa:fa-filter Ingestion Edge)
1818
d0 --> p1(fa:fa-stream Raw Topic)
19-
p1 --> d1(fa:fa-exchange-alt Landfill Sink)
20-
d1 --> b1(fa:fa-database Landfill BQ)
19+
p1 --> d1(fa:fa-exchange-alt Raw Sink)
20+
d1 --> b1(fa:fa-database Raw BQ)
2121
p1 --> d2(fa:fa-exchange-alt Decoder)
2222
d2 -->|success| p2(fa:fa-stream Decoded Topic)
2323
d2 -.->|fail| p3(fa:fa-stream Errors Topic)
2424
p3 --> d4(fa:fa-exchange-alt Errors Sink)
25-
p2 --> d3(fa:fa-exchange-alt BigQuery Sink)
25+
p2 --> d3(fa:fa-exchange-alt Live Sink)
2626
d3 --> b2(fa:fa-database Live Tables BQ)
2727
d4 --> b3(fa:fa-database Error Tables BQ)
2828
@@ -76,8 +76,10 @@ message body of optionally-gzipped JSON.
7676
These messages are forwarded to a PubSub message queue with minimal processing,
7777
and made available in a **Raw** topic.
7878

79-
A [Dataflow] job reads this topic and writes the raw messages to a BigQuery **Landfill** sink.
80-
This Landfill data is not used for analysis, but is stored in its raw form for
79+
A Kubernetes `Raw Sink` job (part of the [`ingestion-sink`][ingestion-sink]
80+
service) reads this topic and writes the raw messages to a BigQuery
81+
`payload_bytes_raw` sink (historically called _Landfill_).
82+
This raw data is not used for analysis, but is stored in its raw form for
8183
recovery and backfill purposes.
8284

8385
If there is a processing error or data-loss downstream in the pipeline, this is an important fail-safe.
@@ -129,11 +131,13 @@ and the [schema generator].
129131
The result are tables that contains SQL-friendly field names for all known
130132
measures, as implemented in the [probe scraper].
131133

132-
A [Dataflow] job reads from the Decoded topic and writes out to
134+
A Kubernetes `Live Sink` job (part of the [`ingestion-sink`][ingestion-sink]
135+
service) reads from the Decoded topic and writes out to
133136
**[live ping tables][table layout]**.
134137
These tables are updated frequently, and typically reflect data within a few
135-
minutes of it being ingested. They are optimized for accessing recent data,
136-
but are only guaranteed to contain a few days of history.
138+
minutes of it being ingested. They are intended for low-latency access to
139+
recent data and are not the supported interface for analysis; for that, use the
140+
**[historical ping tables][table layout]** (stable tables) described below.
137141

138142
Historical raw ping data is stored in **[historical ping tables][table layout]**,
139143
also known as **stable tables**.
@@ -234,4 +238,5 @@ build and work with aggregate datasets rather than individual-level data.
234238
[norm]: ../channels/channel_normalization.md
235239
[bqe]: https://github.com/mozilla/bigquery-etl
236240
[gcp-ingestion]: https://github.com/mozilla/gcp-ingestion
241+
[ingestion-sink]: https://github.com/mozilla/gcp-ingestion/tree/main/ingestion-sink
237242
[looker]: https://mozilla.cloud.looker.com

src/concepts/pipeline/http_edge_spec.md

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,23 @@ documents described by a [JSONSchema].
2323

2424
### GET Request
2525

26-
Accept GET on `/status`, returning `OK` if all is well. This can be used to
27-
check the health of web servers.
26+
The edge server does not serve application data over GET. It exposes
27+
[Dockerflow] health-check endpoints:
28+
29+
- `/__lbheartbeat__` - returns 200 unconditionally; used by the load balancer
30+
and Kubernetes probes to confirm the server is up.
31+
- `/__heartbeat__` - returns 200 when internal checks pass (enough free disk
32+
for the local queue, and the queue is accessible) and 500 otherwise.
33+
- `/__version__` - returns build and version information.
34+
35+
[dockerflow]: https://github.com/mozilla-services/Dockerflow
2836

2937
### GET Response codes
3038

31-
- _200_ - OK. `/status` and all's well
32-
- _404_ - Any GET other than `/status`
33-
- _500_ - All is not well
39+
- _200_ - a health check passed (`/__lbheartbeat__`, or `/__heartbeat__` when
40+
all checks pass), or version info was returned (`/__version__`)
41+
- _404_ - any other GET path
42+
- _500_ - a `/__heartbeat__` check failed
3443

3544
### POST/PUT Request
3645

@@ -67,19 +76,20 @@ A specific example:
6776
Here the `namespace` is fixed as "telemetry", and there is no `docVersion` in the URL.
6877
This means that incoming JSON documents must be parsed to determine the schema version
6978
to apply for validation. This logic is part of the downstream [decoder] job.
70-
Also note the required query parameter suffix `?v=4`.
71-
Documents sent under `/submit/telemetry` without `v=4` will be rejected at the edge.
79+
Also note the query parameter suffix `?v=4`, a historical convention sent by
80+
Firefox Desktop. The edge server routes on the URL path only and forwards the
81+
request body opaquely; the query string is preserved as request metadata.
7282

7383
### POST/PUT Response codes
7484

7585
- _200_ - OK. Request accepted into the pipeline.
7686
- _400_ - Bad request, for example an un-encoded space in the URL.
7787
- _404_ - not found - POST/PUT to an unknown namespace
7888
- _405_ - wrong request type (anything other than POST/PUT)
79-
- _411_ - missing content-length header
80-
- _413_ - request body too large (Note that if we have badly-behaved clients that retry on `4XX`, we may opt to send back 202 on body/path too long).
81-
- _414_ - request path too long (See above)
89+
- _413_ - request body too large
90+
- _431_ - a request header (or other captured metadata attribute) exceeds PubSub's 1024 byte attribute limit
8291
- _500_ - internal error
92+
- _507_ - insufficient storage - the edge's local retry queue is full (for example during an extended PubSub outage)
8393

8494
### Supported HTTP Headers
8595

@@ -132,3 +142,5 @@ is restored and messages can be flushed to the queue.
132142
Based on [past outages], this is typically a few hours or less.
133143

134144
[past outages]: https://status.cloud.google.com/incident/cloud-pubsub
145+
[schemas repository]: https://github.com/mozilla-services/mozilla-pipeline-schemas
146+
[decoder]: gcp_data_pipeline.md#decoding

src/concepts/pipeline/schemas.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,10 +236,11 @@ LIMIT 1
236236

237237
#### Data Structure Normalization
238238

239-
Thee decoder is also responsible for transforming the data to
240-
accommodate BigQuery limitations in data representation. All transformations are defined in
241-
[`ingestion-beam` under
242-
`com.mozilla.telemtry.transforms.PubsubMessageToTableRow`](https://github.com/mozilla/gcp-ingestion/blob/main/ingestion-beam/src/main/java/com/mozilla/telemetry/transforms/PubsubMessageToTableRow.java).
239+
The decoder is also responsible for transforming the data to
240+
accommodate BigQuery limitations in data representation. Most transformations are implemented in
241+
[`ingestion-core` under
242+
`com.mozilla.telemetry.ingestion.core.transform.PubsubMessageToObjectNode`](https://github.com/mozilla/gcp-ingestion/blob/main/ingestion-core/src/main/java/com/mozilla/telemetry/ingestion/core/transform/PubsubMessageToObjectNode.java);
243+
`ingestion-beam`'s `PubsubMessageToTableRow` is a thin wrapper that adds Beam metrics and converts the result to a BigQuery `TableRow`.
243244

244245
The following transformations are currently applied:
245246

0 commit comments

Comments
 (0)