Use this page to learn how to view logs and monitor requests and access control decisions for traffic routed through your Agent Gateway deployment.
Logging
Agent Gateway logs are generated using the
networkservices.googleapis.com/Gateway monitored resource.
You can use these logs to monitor access requests to the gateway. This includes the logs created when Agent Gateway is deployed in dry-run mode.
View logs for a specific gateway
To view the logs for a specific gateway, complete the following steps.
Console query
In the Google Cloud console, go to the Logs Explorer page.
Click the Show query toggle.
Paste the following into the query field.
resource.type="networkservices.googleapis.com/Gateway" resource.labels.location="REGION" resource.labels.gateway_name="AGENT_GATEWAY_NAME"
Replace the following:
REGION: The region of your gateway.AGENT_GATEWAY_NAME: The name of your gateway.
Click Run query.
What is logged
Agent Gateway log entries contain information useful for monitoring and debugging traffic to and from your gateway.
| Field | Field format | Field type: Required or Optional | Description |
|---|---|---|---|
| severity insertID timestamp receiveTimestamp trace traceSampled logName |
LogEntry | Required | The general fields as described in a log entry. |
| httpRequest | HttpRequest | Required | A common protocol for logging HTTP requests. |
| resource | MonitoredResource | Required | The |
| jsonPayload | object (Struct format) | Required | The log entry payload that is expressed as a JSON object. The JSON object contains the following Agent Gateway fields:
|
Monitoring
Agent Gateway exports some Service Extensions metrics to Cloud Monitoring. If you're delegating authorization to Service Extensions, you can use these metrics to monitor traffic to and from your extension. For details, see Logging and monitoring for Cloud Load Balancing callouts.
Observability dashboard
Agent Gateway provides an observability dashboard that lets you monitor, audit, and debug traffic routed through your gateways:
- Scorecards: Track the total number of attempted authorizations, authorization failures, and requests per second.
- Charts: Visualize authorization failure rates (%) and requests per second over time.
- Egress traffic logs: Review detailed logs for egress queries, including
403denials, traffic to unregistered endpoints, and overall traffic trends.
Use the following steps to access the observability dashboard for a gateway in the Google Cloud console:
In the Google Cloud console, go to the Agent Gateway page.
Click the name of the gateway that you want to monitor.
Click the Observability tab.
Dashboard data requirements
The Agent Gateway observability dashboard uses
Observability Analytics to display data. If the dashboard isn't loading data,
ensure that you upgrade the _Default log bucket to use
Observability Analytics. The dashboard
retrieves data from the _Default bucket's _AllLogs
view.
What's next
Codelab: Govern agentic workloads with Agent Platform
Learn how to govern agentic workloads with Agent Gateway on Gemini Enterprise Agent Platform.