Connect Google Cloud
Updated 29 November 2026Route the request logs of your Google Cloud load balancer and Cloud CDN to Brandexa with a log sink and a Pub/Sub push subscription. No access to your project is shared.
What to know
Google Cloud writes the request logs of an external Application Load Balancer, which carries Cloud CDN, to Cloud Logging. You route the crawler requests to a Pub/Sub topic with a log sink, and a push subscription on that topic posts each one to Brandexa. Brandexa never needs access to your project and holds no key for it.
How Brandexa knows the request is yours
The push subscription signs each request with a token that Google issues. You set the token's audience to your Brandexa source key. Brandexa checks Google's signature, that the token has not expired and that the audience is a live key. Only a subscription you configured with that key can send logs to your workspace.
Steps in Brandexa
- Open Agent analytics, then Logs, and choose Connect request logs.
- Choose Google Cloud and pick the domain the load balancer serves.
- Brandexa shows the endpoint, your audience, the sink filter and the fields. The audience is your source key and is shown once, so copy it now.
Steps in Google Cloud
- In Pub/Sub create a topic, for example brandexa-agent-logs.
- In Logging open Log Router and create a sink with the Cloud Pub/Sub topic as the destination. Paste the filter from Brandexa as the inclusion filter.
- Give the sink's writer identity the Pub/Sub Publisher role on the topic.
- In Pub/Sub add a subscription on the topic with the delivery type Push. Paste the endpoint from Brandexa.
- Select Enable authentication, choose a service account you own, and paste your source key as the Audience. Leave payload unwrapping off.
- Give the Pub/Sub service agent the Service Account Token Creator role on that service account.
- Check that logging is on for the backend service of the load balancer. It is off for services created since June 2020 until you turn it on.
The filter limits the sink to requests from known crawlers. It has this shape. Use the full one Brandexa shows:
resource.type="http_load_balancer" AND httpRequest.userAgent=~"(?i)(GPTBot|ClaudeBot|PerplexityBot|Googlebot|bingbot|...)"The push subscription fields:
Delivery type: Push
Endpoint URL: https://ingest.brandexa.com/v1/logs/gcp
Enable authentication: selected
Service account: a service account you own
Audience: <YOUR_SOURCE_KEY>
Enable payload unwrapping: offLogging publishes entries within about a minute. Come back to Brandexa and choose Check status. Brandexa stores no client address and no query string. Google does not give a country in these logs, so the country stays empty.
Brandexa keeps only requests from recognised AI crawlers and search engines. For each one it stores the time, host, path without the query string, method, status, size, country and crawler name. It does not store visitor addresses, query strings, cookies or the user agent text.
Cost and volume
- A push subscription sends one request for each log entry. The sink filter keeps that to crawler requests, which is why Brandexa asks for it.
- Cloud Logging and Pub/Sub charge for the entries they route and deliver. Check your own prices for the volume of your crawler traffic.
- If the backend service samples its logs below 100 percent, Brandexa sees a sample and the counts are lower than the real visits.
If something goes wrong
- Nothing appears. Check that logging is on for the backend service, that the sink filter is in place and that the sink's writer identity can publish to the topic.
- The subscription shows delivery errors. Check that authentication is on, that the audience is your source key with nothing added, and that the Pub/Sub service agent can create tokens for the service account.
- Brandexa answers 401. The key was rotated or removed. Paste the new key as the audience.
- To stop, delete the push subscription and the sink.