diff --git a/src/content/docs/workers/runtime-apis/request.mdx b/src/content/docs/workers/runtime-apis/request.mdx index 5fa8ad7d86058e7..12bb3ab6bc5d48b 100644 --- a/src/content/docs/workers/runtime-apis/request.mdx +++ b/src/content/docs/workers/runtime-apis/request.mdx @@ -227,6 +227,14 @@ All plans have access to: * If Cloudflare replaces the value of the `Accept-Encoding` header, the original value is stored in the `clientAcceptEncoding` property, for example, `"gzip, deflate, br"`. +* `clientQuicRtt` number | undefined + + * The smoothed round-trip time (RTT) between Cloudflare and the client for QUIC connections, in milliseconds. Only present when the client connected over QUIC (HTTP/3). For example, `42`. + +* `clientTcpRtt` number | undefined + + * The smoothed round-trip time (RTT) between the client and Cloudflare for TCP connections, in milliseconds. Only present when the client connected over TCP (HTTP/1 and HTTP/2). For example, `22`. + * `colo` string * The three-letter [`IATA`](https://en.wikipedia.org/wiki/IATA_airport_code) airport code of the data center that the request hit, for example, `"DFW"`. @@ -235,6 +243,12 @@ All plans have access to: * Country of the incoming request. The two-letter country code in the request. This is the same value as that provided in the `CF-IPCountry` header, for example, `"US"`. +* `edgeL4` Object | undefined + + * Layer 4 transport statistics for the connection between the client and Cloudflare. Contains the following property: + * `deliveryRate` number - The most recent data delivery rate estimate for the connection, in bytes per second. For example, `123456`. + + * `isEUCountry` string | null * If the country of the incoming request is in the EU, this will return `"1"`. Otherwise, this property is either omitted or `false`. @@ -454,4 +468,4 @@ Incoming `Request` objects passed to the [`fetch()` handler](/workers/runtime-ap * [Examples: Modify request property](/workers/examples/modify-request-property/) * [Examples: Accessing the `cf` object](/workers/examples/accessing-the-cloudflare-object/) * [Reference: `Response`](/workers/runtime-apis/response/) -* Write your Worker code in [ES modules syntax](/workers/reference/migrate-to-module-workers/) for an optimized experience. +* Write your Worker code in [ES modules syntax](/workers/reference/migrate-to-module-workers/) for an optimized experience. \ No newline at end of file diff --git a/src/content/fields/index.yaml b/src/content/fields/index.yaml index 9978a1c68893079..cd1c2db8576f171 100644 --- a/src/content/fields/index.yaml +++ b/src/content/fields/index.yaml @@ -898,13 +898,47 @@ entries: example_value: |- true + - name: cf.edge.l4.delivery_rate + data_type: Integer + categories: [Request] + keywords: + [request, l4, delivery rate, bandwidth, network, performance, transport] + summary: The most recent data delivery rate estimate for the client connection, in bytes per second. + description: |- + This metric reflects the rate at which data is being successfully delivered over the connection. + + Returns `0` when L4 statistics are not available for the request. + example_value: |- + 123456 + example_block: |- + # Match requests where the delivery rate is below 100 KB/s + cf.edge.l4.delivery_rate < 100000 + - name: cf.timings.client_tcp_rtt_msec data_type: Number categories: [Request] keywords: [request, timing, tcp, rtt, performance, latency] - summary: The smoothed TCP round-trip time (RTT) from client to Cloudflare in milliseconds. + summary: The smoothed TCP round-trip time (RTT) between Cloudflare and the client in milliseconds. + description: |- + This field is only populated for TCP (HTTP/1, HTTP/2) connections. For QUIC connections, the value is `0`. example_value: |- 20 + example_block: |- + # Match requests over TCP where the RTT exceeds 200 ms + cf.timings.client_quic_rtt_msec > 200 + + - name: cf.timings.client_quic_rtt_msec + data_type: Integer + categories: [Request] + keywords: [request, timing, quic, rtt, performance, latency, http3] + summary: The smoothed QUIC round-trip time (RTT) between Cloudflare and the client in milliseconds. + description: |- + This field is only populated for QUIC (HTTP/3) connections. For TCP connections, the value is `0`. + example_value: |- + 42 + example_block: |- + # Match requests over QUIC where the RTT exceeds 200 ms + cf.timings.client_quic_rtt_msec > 200 - name: cf.timings.edge_msec data_type: Integer @@ -2205,4 +2239,4 @@ entries: You can use this field to customize the response for a specific type of error (for example, all 1XXX errors or all WAF block actions). - **Note**: This field is only available in [Response Header Transform Rules](/rules/transform/response-header-modification/) and [Custom Errors](/rules/custom-errors/). + **Note**: This field is only available in [Response Header Transform Rules](/rules/transform/response-header-modification/) and [Custom Errors](/rules/custom-errors/). \ No newline at end of file