Skip to main content
A Log Router sink sends Cloud Logging entries to a Pub/Sub topic, and a push subscription posts each entry to Squasher. You can create them in the console, or let Squasher create them through the API.

Prerequisites

  • Permission in the Google Cloud project to create Log Router sinks and Pub/Sub topics and subscriptions.
  • An ingest key and the project ID. See Create an ingest key.

Set up the drain

1

Create the sink

  1. In the Google Cloud console, open Log Router and select Create sink.
  2. Enter a Sink name. In Select sink service, choose Pub/Sub topic, and create a topic.
  3. In Build inclusion filter, select the entries to send, for example severity>=WARNING.
  4. Select Create sink. Give the sink’s writer identity permission to publish to the topic.
2

Create the push subscription

  1. Open Subscriptions in Pub/Sub and select Create subscription.
  2. Enter a Subscription ID and select the topic of the sink.
  3. Set Delivery type to Push, and set Endpoint URL to https://ingest.squasher.ai/v1/drain/gcp/<project-id>?key=<your ingest key>.
  4. Turn on Enable payload unwrapping, and leave Enable authentication off.
  5. Create the subscription.
Pub/Sub push cannot add custom headers, so the ingest key goes in the URL. Anyone who can read the subscription can see the key.

What Squasher keeps from each record

ALERT, EMERGENCY, and NOTICE entries are stored at info level and create no issues. Every entry gets the service name gcp.

Verify

  1. Write one entry at ERROR severity, for example with gcloud logging write squasher-test "Squasher test error" --severity=ERROR.
  2. In Squasher, select Issues in the sidebar. The entry is at the top of the list.
  3. If nothing arrives, check the subscription’s push errors in Pub/Sub.

Let Squasher create the sink

A provider connection creates the sink, the topic, and an authenticated push subscription after you approve Google access. It also pulls Cloud Monitoring metrics. This path reads the entries more fully:
  • The log body is textPayload, or jsonPayload or protoPayload as JSON, not the full entry.
  • Squasher maps all nine Cloud Logging severities, so ALERT and EMERGENCY also create issues.
  • Resource labels, entry labels, and the trace ID become attributes.
The filter is required: send it as log_filter when you select the Google Cloud project. If the Google Cloud card on Integrations shows Manual setup, this path is not available yet. Use the console steps instead.

Limits

  • Drain records have no environment, so automatic AI triage does not run on their issues.
  • Pub/Sub, Cloud Logging, and Cloud Monitoring can charge for the data that they move. Keep the inclusion filter narrow.

Next steps

Provider connections

Let Squasher create the sink from Integrations or through the API.

OpenTelemetry

Send traces and errors from Cloud Run and GKE apps.