Skip to main content

Overview

Cloud Run writes logs to Google Cloud Logging. To reach Bronto, a Cloud Logging sink routes them to Pub/Sub, and an OpenTelemetry Collector with the googlecloudpubsub receiver forwards them on.
Do not push Pub/Sub directly to Bronto’s HTTP endpoint — Pub/Sub wraps each message in an envelope (base64 message.data) that Bronto cannot parse. The OTel Collector unwraps it.

Prerequisites

  • A Bronto account and API key (how to create one)
  • A Google Cloud project with Cloud Run services and Cloud Logging enabled (the default)
  • An OpenTelemetry Collector running in your GCP environment (e.g. on Cloud Run or GKE)

How it works

Cloud Run → Cloud Logging → Log sink → Pub/Sub → OTel Collector → Bronto

Step 1: Route Cloud Run logs to Pub/Sub

  1. Create a Pub/Sub topic (e.g. bronto-cloud-run-logs) and a pull subscription (e.g. bronto-cloud-run-logs-sub).
  2. In Logging → Log Router, create a sink to that topic with the inclusion filter:
resource.type="cloud_run_revision"
Grant the Collector’s service account the roles/pubsub.subscriber role. For details, see the Cloud Logging routing docs.

Step 2: Configure the Collector

/etc/otel/config.yaml
receivers:
  googlecloudpubsub:
    project: <YOUR_GCP_PROJECT_ID>
    subscription: projects/<YOUR_GCP_PROJECT_ID>/subscriptions/bronto-cloud-run-logs-sub

processors:
  batch:

exporters:
  otlphttp/brontologs:
    logs_endpoint: "https://ingestion.<REGION>.bronto.io/v1/logs"
    compression: gzip
    headers:
      x-bronto-api-key: <YOUR_API_KEY>
      x-bronto-collection: <YOUR_COLLECTION_NAME>

service:
  pipelines:
    logs:
      receivers: [googlecloudpubsub]
      processors: [batch]
      exporters: [otlphttp/brontologs]
Set <REGION> to eu or us. Already have a Pub/Sub sink? Add just the receiver, exporter, and logs pipeline above to your existing Collector.

What you will see in Bronto

Open Search and filter by your collection. You get Cloud Run request logs (one per HTTP request — status, latency, path) and application logs (anything written to stdout/stderr), with GCP metadata (project, service, revision, region) as attributes.

Troubleshooting

  • No logs? Confirm the Log Router sink is active and its filter matches your services; check the Pub/Sub topic’s published-message count.
  • Collector not receiving? Verify the subscription exists and the service account has pubsub.subscriber, then check the Collector’s own logs.
  • For the receiver reference, see the googlecloudpubsub receiver docs.