diff --git a/content/docs/kubernetes/main/documentation/llm/guardrails/overview.md b/content/docs/kubernetes/main/documentation/llm/guardrails/overview.md index 0742e401c..6877114f6 100644 --- a/content/docs/kubernetes/main/documentation/llm/guardrails/overview.md +++ b/content/docs/kubernetes/main/documentation/llm/guardrails/overview.md @@ -130,9 +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. - ```yaml kubectl apply -f - <}} @@ -158,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 5053520d1..d561d6e37 100644 --- a/content/docs/kubernetes/main/documentation/resiliency/connection.md +++ b/content/docs/kubernetes/main/documentation/resiliency/connection.md @@ -41,12 +41,14 @@ 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. | + 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. ```sh