What’s tracked
- Code suggestions — Suggestions shown and accepted per user, per day
- Accepted lines — Lines of code accepted from suggestions
- Acceptance rate — Share of shown suggestions that were accepted
- Active users — Which engineers used Gemini Code Assist each day
Weave reads only the IDE metadata logs: suggestion counts, acceptance events, and accepted lines, for both inline suggestions and Gemini Code Assist chat. No prompt or response content is read.
Prerequisites
- Gemini Code Assist Standard or Enterprise
- Google Cloud admin access to the project where Code Assist runs (to enable logging, create the BigQuery sink, and grant IAM)
Setup
1
Enable Gemini Code Assist logging
In the Google Cloud console, enable logging for Gemini for Google Cloud on the project where your engineers use Code Assist. See Generate Gemini for Google Cloud metrics for the exact steps.
2
Create a BigQuery dataset
Create a BigQuery dataset to receive the exported logs (any region works). We suggest naming it
weave_gemini_observability so it’s easy to recognize later, but any name is fine.3
Create a Log Router sink
Create a Log Router sink that routes Gemini Code Assist logs to the dataset you just created:
- Set the destination to the BigQuery dataset from step 2
- Set the inclusion filter to:
- Check Use partitioned tables when creating the sink
4
Grant Weave access
In Weave, go to Data → Gemini, select In the IDE under How does your team use Gemini?, and click Set up BigQuery export on the Gemini Code Assist card. Copy the Reader service account email shown in the configure form. In BigQuery, grant that service account the BigQuery Data Viewer role on the dataset you created in step 2. Grant it at the dataset level, not the project level.
5
Configure in Weave
Back in the Gemini Code Assist configure form, enter:
- GCP project ID — the project where you created the BigQuery dataset
- BigQuery dataset ID — the dataset from step 2
- BigQuery table ID (optional) — leave blank to use the standard metadata-log table Cloud Logging creates from the sink
Metrics enabled
Once connected, you can track:- AI code LOC — Lines accepted from Gemini Code Assist suggestions
- AI output percentage — Portion of output from Gemini Code Assist
- AI efficiency index — Impact on productivity
Sync frequency
Weave polls the BigQuery metadata table on a regular schedule. Expect data to appear within a few hours of the first successful sync, and daily thereafter as new logs land in the table.Troubleshooting
Validation failing
Validation failing
If Weave fails to validate access to your BigQuery dataset:
- Confirm the reader service account was granted BigQuery Data Viewer on the dataset — IAM grants can take a few minutes to propagate
- Check that the sink has produced its metadata table — it only appears in the dataset after the first Code Assist activity following sink creation
- Double check the GCP project ID and BigQuery dataset ID entered in Weave match exactly what you created
No data appearing after setup
No data appearing after setup
If no usage data appears in Weave after validation succeeds:
- Confirm the Log Router sink’s inclusion filter matches exactly (
resource.type="cloudaicompanion.googleapis.com/Instance" AND labels.product="code_assist") - Verify your engineers have been active in Gemini Code Assist since the sink was created — logs only exist for activity after sink creation, not retroactively
- If you set a custom BigQuery table ID, confirm it matches the table the sink actually writes to
- Wait a few hours for the first sync to complete
Data privacy
Weave syncs only IDE usage metadata from the Gemini Code Assist metadata logs:- Suggestion counts and acceptance rates
- Lines of code accepted
- Active user counts per day
- Your source code content
- AI prompts or chat conversations
- Gemini’s responses
- File names or project structure
Related integrations
- Gemini CLI — Google’s terminal AI assistant
- Devin — also auto-detected, with an optional direct integration for activity and cost
- Claude Code — CLI-based AI assistant
