From 603b230c42171bf24c678be0c6796fe61cbb5f22 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 7 Nov 2026 10:22:25 +0000 Subject: [PATCH 1/2] Docs fixes from checking the docs against the code Drafts-Commit: 5951f7c049529c7bca825635549474eed0f51273 Signed-off-by: GitHub Action --- .../kubernetes/main/documentation/llm/guardrails/overview.md | 4 ++++ .../kubernetes/main/documentation/resiliency/connection.md | 2 ++ 2 files changed, 6 insertions(+) diff --git a/content/docs/kubernetes/main/documentation/llm/guardrails/overview.md b/content/docs/kubernetes/main/documentation/llm/guardrails/overview.md index 0742e401c..64f7d71f5 100644 --- a/content/docs/kubernetes/main/documentation/llm/guardrails/overview.md +++ b/content/docs/kubernetes/main/documentation/llm/guardrails/overview.md @@ -133,6 +133,10 @@ The following policy runs a credit card detector and OpenAI moderation, both in > [!NOTE] > Audit mode changes only whether the gateway acts on the verdict. The guard still calls its provider, so an external guard in audit mode adds the same latency and the same provider cost as an enforcing guard. +To record audit results in access logs, add the `guardrails` CEL variable to a frontend access log field. For the field shape and a Gateway-level logging policy, see [Log guardrail results]({{< link-hextra path="/documentation/security/access-logging/#guardrails" >}}). + +The proxy also records guardrail checks in the `agentgateway_guardrail_checks_total` Prometheus counter, with labels for the request or response phase and the action. A matching audit guard increments the audit action, while an audit guard that finds nothing records an allow action. + ```yaml kubectl apply -f - <}} diff --git a/content/docs/kubernetes/main/documentation/resiliency/connection.md b/content/docs/kubernetes/main/documentation/resiliency/connection.md index 5053520d1..a5af79e48 100644 --- a/content/docs/kubernetes/main/documentation/resiliency/connection.md +++ b/content/docs/kubernetes/main/documentation/resiliency/connection.md @@ -47,6 +47,8 @@ The `frontend` settings on this page tune the connections that clients open to t | `tcp.keepalive.retries` | Maximum number of keepalive probes to send before agentgateway drops the connection. The default is `9`. | | `http.requestTimeout` | Deadline for receiving a response from the backend. | + If no `backend.tcp.connectTimeout` policy applies, connection attempts use the process-wide default of 11 seconds. Policy merging replaces the more general `backend.tcp` block with the more specific one. For example, an HTTPRoute policy that sets only `backend.tcp.keepalive` does not inherit `connectTimeout` from a Service policy; the connection attempt falls back to the 11-second default. + 2. Port-forward the proxy admin port and verify the settings in the proxy configuration. ```sh From f607ac3900d66fc201f99df56f4f9e0b91b9b703 Mon Sep 17 00:00:00 2001 From: Art Berger Date: Mon, 16 Nov 2026 20:27:15 -0500 Subject: [PATCH 2/2] Fix guardrail log link, metric labels, and connectTimeout default Move the audit logging and metrics paragraphs after the YAML that the lead-in sentence introduces, point the link at the access-logs page instead of the redirect stub, and name the capitalized label values. Fold the 11s connectTimeout default into the table row. Co-Authored-By: Claude Opus 5.5 Signed-off-by: Art Berger --- .../main/documentation/llm/guardrails/overview.md | 14 +++++++------- .../main/documentation/resiliency/connection.md | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/content/docs/kubernetes/main/documentation/llm/guardrails/overview.md b/content/docs/kubernetes/main/documentation/llm/guardrails/overview.md index 64f7d71f5..6877114f6 100644 --- a/content/docs/kubernetes/main/documentation/llm/guardrails/overview.md +++ b/content/docs/kubernetes/main/documentation/llm/guardrails/overview.md @@ -130,13 +130,6 @@ Audit mode is how you measure a guard before you enforce it. Start a new guard i The following policy runs a credit card detector and OpenAI moderation, both in audit mode, so that the gateway logs what each guard finds and then forwards the request. -> [!NOTE] -> Audit mode changes only whether the gateway acts on the verdict. The guard still calls its provider, so an external guard in audit mode adds the same latency and the same provider cost as an enforcing guard. - -To record audit results in access logs, add the `guardrails` CEL variable to a frontend access log field. For the field shape and a Gateway-level logging policy, see [Log guardrail results]({{< link-hextra path="/documentation/security/access-logging/#guardrails" >}}). - -The proxy also records guardrail checks in the `agentgateway_guardrail_checks_total` Prometheus counter, with labels for the request or response phase and the action. A matching audit guard increments the audit action, while an audit guard that finds nothing records an allow action. - ```yaml kubectl apply -f - <}} @@ -162,6 +155,13 @@ spec: EOF ``` +To record audit results in access logs, add the `guardrails` CEL variable to a frontend access log field. For the field shape and a Gateway-level logging policy, see [Log guardrail results]({{< link-hextra path="/documentation/observability/access-logs/view/#guardrails" >}}). + +The proxy also counts guardrail checks in the `agentgateway_guardrail_checks_total` Prometheus counter. The `phase` label is `Request` or `Response`, and the `action` label records the result of the check. An audit guard that finds a match records `action="Audit"`. An audit guard that finds nothing records `action="Allow"`. + +> [!NOTE] +> Audit mode changes only whether the gateway acts on the verdict. The guard still calls its provider, so an external guard in audit mode adds the same latency and the same provider cost as an enforcing guard. + ## Provider failures Set `failureMode` on a `webhook`, `openAIModeration`, `bedrockGuardrails`, or `googleModelArmor` guard to choose what happens when the provider is unreachable or returns an error. The default, `FailClosed`, rejects the request or response. Set `failureMode: FailOpen` to let the content continue unchanged instead. diff --git a/content/docs/kubernetes/main/documentation/resiliency/connection.md b/content/docs/kubernetes/main/documentation/resiliency/connection.md index a5af79e48..d561d6e37 100644 --- a/content/docs/kubernetes/main/documentation/resiliency/connection.md +++ b/content/docs/kubernetes/main/documentation/resiliency/connection.md @@ -41,13 +41,13 @@ The `frontend` settings on this page tune the connections that clients open to t | Setting | Description | | -- | -- | - | `tcp.connectTimeout` | Deadline for establishing a connection to the destination. The value must be at least `100ms`. | + | `tcp.connectTimeout` | Deadline for establishing a connection to the destination. The value must be at least `100ms`. The default is `11s`. | | `tcp.keepalive.time` | How long a connection stays idle before agentgateway starts to send keepalive probes. The default is `180s`. | | `tcp.keepalive.interval` | Time between keepalive probes. The default is `180s`. | | `tcp.keepalive.retries` | Maximum number of keepalive probes to send before agentgateway drops the connection. The default is `9`. | | `http.requestTimeout` | Deadline for receiving a response from the backend. | - If no `backend.tcp.connectTimeout` policy applies, connection attempts use the process-wide default of 11 seconds. Policy merging replaces the more general `backend.tcp` block with the more specific one. For example, an HTTPRoute policy that sets only `backend.tcp.keepalive` does not inherit `connectTimeout` from a Service policy; the connection attempt falls back to the 11-second default. + Policy merging replaces the more general `backend.tcp` block with the more specific one. For example, an HTTPRoute policy that sets only `backend.tcp.keepalive` does not inherit `connectTimeout` from a policy that targets the Service. The connection attempt then uses the default `connectTimeout` of `11s`. 2. Port-forward the proxy admin port and verify the settings in the proxy configuration.