Skip to main content
Connect Gemini Code Assist to track your team’s AI-assisted IDE usage. Gemini Code Assist is auto-detected from commit metadata by default, so its contributions already show up as foreground AI. Connecting this BigQuery integration adds daily, per-user IDE usage metrics by reading the metadata logs your Google Cloud project already exports to BigQuery.

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:
  1. Set the destination to the BigQuery dataset from step 2
  2. Set the inclusion filter to:
  1. Check Use partitioned tables when creating the sink
The metadata table appears in the dataset after the first Code Assist activity following sink creation.
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
Click Save — Weave validates access and syncs on a regular schedule. Data appears within a few hours of the first sync.

Metrics enabled

Once connected, you can track:

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

If Weave fails to validate access to your BigQuery dataset:
  1. Confirm the reader service account was granted BigQuery Data Viewer on the dataset — IAM grants can take a few minutes to propagate
  2. Check that the sink has produced its metadata table — it only appears in the dataset after the first Code Assist activity following sink creation
  3. Double check the GCP project ID and BigQuery dataset ID entered in Weave match exactly what you created
If no usage data appears in Weave after validation succeeds:
  1. Confirm the Log Router sink’s inclusion filter matches exactly (resource.type="cloudaicompanion.googleapis.com/Instance" AND labels.product="code_assist")
  2. 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
  3. If you set a custom BigQuery table ID, confirm it matches the table the sink actually writes to
  4. 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
We never access:
  • Your source code content
  • AI prompts or chat conversations
  • Gemini’s responses
  • File names or project structure
  • 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
Last modified on October 17, 2026