GCP logs: Alloy + Pub/Sub
Complexity: Moderate | Infrastructure: Pub/Sub + Alloy | Latency: Streaming
You create a log sink in Cloud Logging with filters that select which logs to export. The sink routes them to a topic in Pub/Sub, Google Cloud’s managed messaging service. Alloy subscribes to the topic, processes the logs, and forwards them to Grafana Cloud Logs. Sink filters let you reduce volume at the source.
Considerations
- Log sink filtering to reduce volume
- Application Default Credentials for Alloy
- Processing pipeline for filtering and relabeling
- Alloy infrastructure to deploy, maintain, and update
- Pub/Sub cost, plus setup steps
Documentation
View the GCP logs documentation.