All logs will be written to this volume. The Better Stack sidecar container will read the logs from the volume and ship them our way.
Explore documentation
Google Run logging
Start logging in 10 minutes
Ship your Google Run runtime logs to Better Stack using a Vector sidecar container.
Create Better Stack Vector source
- Go to Better Stack → Sources → Connect source.
- Name your source and select Vector from the Logs + Metrics section.
- Keep this tab open. You’ll need the Source token and Ingesting host later.
Create Google Run volume
- Navigate to Google Cloud → Google Run.
- Open configuration for your Service or Job.
- Create volume of any type.
Mount the volume and add the Better Stack sidecar container
Attach the volume to both your main container and the Better Stack sidecar container, and configure the sidecar.
- Mount volume to main container
- Navigate to Containers tab -> Volume mounts tab.
- Click Mount volume and choose the volume you created.
- Type in Mount path – e.g.,
shared-volume/logs
.
- Add Better Stack sidecar container
- Scroll down and select Add container
- Fill in Container image URL:
registry-1.docker.io/betterstack/google-run-vector:amd64-latest
- Configure startup probe
- Stay in Settings tab.
- Set Startup probe → Port: 8686.
Add environment variables
In Variables & secrets, add the following variables:
Environment variablesBETTER_STACK_SOURCE_TOKEN=$SOURCE_TOKEN BETTER_STACK_INGESTING_HOST=$INGESTING_HOST BETTER_STACK_LOG_PATH=shared-volume/logs/*.log
Mount volume to sidecar container
- Click Volume mounts tab -> Mount volume.
- Select the volume you created.
- Fill in Mount path – e.g.,
shared-volume/logs
.
Write logs to the shared volume
Make sure your main container writes logs to the mounted volume – e.g., shared-volume/logs/app.log
.
You should see your logs in Better Stack → Live tail.
Need help?
Please let us know at hello@betterstack.com. We're happy to help! 🙏