Commit Graph

59 Commits

Author SHA1 Message Date
Christie Warwick (Wilson) 70996bfdee feat: Add Open Telemetric semantic standard compliant log (#11975) 2025-10-28 20:02:46 +00:00
Jacob MacDonald a6e00d9183 Fix rough edges around extension updates (#10926) 2025-10-10 21:28:13 +00:00
Christie Warwick (Wilson) 83075b2800 refactor: make log/event structure clear (#10467) 2025-10-09 23:02:58 +00:00
Jerop Kipruto 1f6716f98a feat(telemetry): add diff stats to tool call metrics (#10819) 2025-10-09 22:01:35 +00:00
Abhi 70610c740e feat(telemetry): Add telemetry for web_fetch fallback attempts (#10749) 2025-10-09 17:01:17 +00:00
Abhi c0552ceb22 feat(core): add telemetry for subagent execution (#10456) 2025-10-08 12:42:33 -07:00
Jerop Kipruto eae8b8b1a1 fix(core): use constant for tool_output_truncated event name (#10372) 2025-10-02 16:51:14 +00:00
anthony bushong aa8b2abe3d fix(core): add telemetry support for smart edit correction events (#10378)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-10-02 01:35:45 +00:00
Victor May 8174e1d5b8 Smart Edit Strategy Logging (#10345)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-10-01 21:53:53 +00:00
Jerop Kipruto 5b16771567 feat(telemetry): add OpenTelemetry GenAI semantic convention metrics (#10343) 2025-10-01 20:24:55 +00:00
Christie Warwick (Wilson) 5c6f006634 Refactor metrics definitions to be easily understandable (#10215) 2025-10-01 13:33:47 +00:00
Victor May 4bd4cd697b Log Model Slash Commands (#9250) 2025-09-23 22:06:03 +00:00
shishu314 98461ff667 metrics(extension) - Add logging for disable extension (#9238)
Co-authored-by: Shi Shu <shii@google.com>
2025-09-23 18:37:35 +00:00
shishu314 bcfd50b45b metrics(extensions) - Add logging methods for extensions operations (#8702)
Co-authored-by: Shi Shu <shii@google.com>
2025-09-18 18:01:36 +00:00
Abhi a0079785af feat(telemetry): Add telemetry and metrics for model routing (#8518) 2025-09-16 20:53:58 +00:00
Sandy Tao f7ff26ba65 feat(logging): Add clearcut logging for disabling loop detection (#8503) 2025-09-15 21:12:39 +00:00
shishu314 5504f933e1 fix(metrics) - Remove the error field from ApiResponseEvent (#8207)
Co-authored-by: Shi Shu <shii@google.com>
2025-09-11 17:35:17 +00:00
Sandy Tao 095351bf39 feat(telemetry): Add content length to tool calls and log tool output truncation event (#8014) 2025-09-11 15:40:46 +00:00
Jerop Kipruto 8f4321b1ca feat: add telemetry for output format usage (#8223) 2025-09-11 13:42:10 +00:00
joshualitt f0bbfe5f0a feat(core): Download ripgrep at runtime, if enabled. (#7818) 2025-09-08 21:44:56 +00:00
Shardul Natu 2aa25ba87b add(telemetry): Add OTel logging for FileOperationEvent (#7082)
Co-authored-by: Shnatu <snatu@google.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-09-04 17:20:46 +00:00
Bryan Morgan 17044876f6 Fix duplicate LOC counting due to diff_stat being passed in multiple places (#7483) 2025-08-31 11:41:28 +00:00
Shardul Natu 539a49bd24 add(telemetry): Add missing telemetry for UserPromptEvent (#6885)
Co-authored-by: Shnatu <snatu@google.com>
Co-authored-by: Arya Gummadi <aryagummadi@google.com>
2025-08-28 02:17:32 +00:00
Victor May 08bdd08412 Clearcut Logging of Content Error Metrics (#7099)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2025-08-26 19:37:18 +00:00
Pascal Birchler 0f031a7f89 Explict imports & exports with type modifier (#3774) 2025-08-25 22:04:53 +00:00
Steven 415d3413c4 feat(telemetry): Add email to telemetry prompt (#6339)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Arya Gummadi <aryagummadi@google.com>
2025-08-25 20:06:53 +00:00
shishu314 cd75d94262 Log yolo mode + number of turns (#6055)
Co-authored-by: Shi Shu <shii@google.com>
2025-08-25 20:06:47 +00:00
Shardul Natu 1918f4466b add(OTel): Add OTel logging for MalformedJsonEvent (#6912)
Co-authored-by: Shnatu <snatu@google.com>
Co-authored-by: cornmander <shikhman@google.com>
2025-08-25 02:11:41 +00:00
Nanda Kishore 528227a0f8 feat: Add programming language to CLI events (#6071)
Co-authored-by: christine betts <chrstn@uw.edu>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Adam Weidman <65992621+adamfweidman@users.noreply.github.com>
Co-authored-by: JaeHo Jang <diehreo@gmail.com>
Co-authored-by: Jacob Richman <jacob314@gmail.com>
Co-authored-by: Victor May <mayvic@google.com>
Co-authored-by: Gaurav <39389231+gsquared94@users.noreply.github.com>
Co-authored-by: joshualitt <joshualitt@google.com>
Co-authored-by: Billy Biggs <bbiggs@google.com>
Co-authored-by: Ricardo Fabbri <rfabbri@gmail.com>
Co-authored-by: Arya Gummadi <aryagummadi@google.com>
Co-authored-by: Tommaso Sciortino <sciortino@gmail.com>
Co-authored-by: Gal Zahavi <38544478+galz10@users.noreply.github.com>
Co-authored-by: Shreya Keshive <skeshive@gmail.com>
Co-authored-by: Ben Guo <36952867+HunDun0Ben@users.noreply.github.com>
Co-authored-by: Ben Guo <hundunben@gmail.com>
Co-authored-by: mkusaka <hinoshita1992@gmail.com>
2025-08-22 12:17:32 +00:00
agarwalravikant 6b843ca3a8 Changes to add MCP tool count, and MCP tool name as dimension (#6631)
Co-authored-by: Ravikant Agarwal <ravikantag@google.com>
Co-authored-by: Bryan Morgan <bryanmorgan@google.com>
2025-08-20 14:22:22 +00:00
owenofbrien b561d3bbed Log all session metadata (#6423) 2025-08-19 20:06:00 +00:00
agarwalravikant 58c2925624 Changes to add tool_type as dimension (#6538)
Co-authored-by: Ravikant Agarwal <ravikantag@google.com>
2025-08-19 05:25:47 +00:00
Richie Foreman 71f706cf29 feat(client/compression): Log telemetry when compressing chat context. (#6195) 2025-08-18 19:59:13 +00:00
Richie Foreman 2998f27f70 chore(compiler): Enable strict property access TS compiler flag. (#6255)
Co-authored-by: Jacob Richman <jacob314@gmail.com>
2025-08-17 16:43:21 +00:00
Deepankar Sharma 9c7fb870c1 Add terminal setup command for Shift+Enter and Ctrl+Enter support (#3289)
Co-authored-by: jacob314 <jacob314@gmail.com>
2025-08-13 17:32:54 +00:00
Shreya Keshive 268627469b Refactor IDE client state management, improve user-facing error messages, and add logging of connection events (#5591)
Co-authored-by: matt korwel <matt.korwel@gmail.com>
2025-08-05 22:52:58 +00:00
Sandy Tao 23c014e29c Replace FlashDecidedToContinueEvent with NextSpeakerCheckEvent (#5257) 2025-07-31 04:47:04 +00:00
Shreya Keshive 293bb82019 Adds centralized support to log slash commands + sub commands (#5128) 2025-07-29 20:20:37 +00:00
Sandy Tao 7c3a84075d Log flash continue (#4700) 2025-07-23 01:01:24 +00:00
Sandy Tao 886faa2990 Log the 2 types of loop detection (#4193) 2025-07-15 04:44:07 +00:00
Bryan Morgan ff3722a3a7 Fix circular reference JSON serialization in telemetry logging (#4150) 2025-07-14 20:20:06 +00:00
uttamkanodia14 5b5f496436 Adds Flash Fallback logging and clearcut logging (#3843) 2025-07-11 21:10:25 +00:00
Abhi 770f862832 feat: Change /stats to include more detailed breakdowns (#2615) 2025-06-30 00:44:33 +00:00
owenofbrien 4cfab0a893 Clearcut logging - initial implementation (#1274)
Flag-guarded initial implementation of a clearcut logger to collect telemetry data and send it to Concord for dashboards, etc.
2025-06-22 14:26:48 +00:00
Brandon Keiji 1d32313a30 fix: remove circular references in core package (#1271) (#1272) 2025-06-20 16:21:09 -07:00
Abhi fbbb6f2611 Bug fix telemetry token count (#1250)
Co-authored-by: N. Taylor Mullen <ntaylormullen@google.com>
2025-06-20 05:45:29 +00:00
matt korwel 04518b52c0 Auth First Run (#1207)
Co-authored-by: Tommaso Sciortino <sciortino@gmail.com>
Co-authored-by: N. Taylor Mullen <ntaylormullen@google.com>
2025-06-19 16:52:22 -07:00
Brandon Keiji 332512853e feat: consolidate sandbox configurations into a single object (#1154) 2025-06-18 17:01:00 +00:00
Jerop Kipruto 53753f0455 Add telemetry command and refactor telemetry settings (#1060)
#750 

### Telemetry Settings
Refactors telemetry configuration to use a nested `telemetry` object in `settings.json`, for example:

```json
{
  "telemetry": {
    "enabled": true,
    "target": "gcp"
    "log-prompts": "true"
  },
  "sandbox": false
}
```

The above includes
- Centralized telemetry settings under a `telemetry` object in `settings.json`.
- CLI flags for the `gemini` command to override all telemetry sub-settings:
    - `--telemetry` / `--no-telemetry`
    - `--telemetry-target <local|gcp>`
    - `--telemetry-otlp-endpoint <URL>`
    - `--telemetry-log-prompts` / `--no-telemetry-log-prompts`
- Updates `packages/cli/src/config/config.ts` and `packages/core/src/config/config.ts` to read from the new settings structure and respect the new CLI flags.
- Modifies `scripts/handle-telemetry.js`, `scripts/local_telemetry.js`, and `scripts/telemetry_utils.js` to align with the new settings structure.
- Updates `docs/core/telemetry.md` to reflect the new settings structure, CLI flags, and order of precedence.
- Renames `logUserPromptsEnabled` to `logPrompts` for brevity.

### `npm run telemetry`

Add a new `npm run telemetry` command that uses `scripts/telemetry.js`, automates the entire process of setting up a local and GCP telemetry pipelines, including configuring the necessary settings in the `.gemini/settings.json` workspace file and installing required binaries (e.g. `otelcol-contrib`).

---
```shell
$ npm run telemetry -- --target=gcp

> gemini-cli@0.1.0 telemetry
> node scripts/telemetry.js --target=gcp

⚙️  Using command-line target: gcp
🚀 Running telemetry script for target: gcp.
 Starting Local Telemetry Exporter for Google Cloud 
⚙️  Enabled telemetry in workspace settings.
🔧 Set telemetry OTLP endpoint to http://localhost:4317.
🎯 Set telemetry target to gcp.
 Workspace settings updated.
 Using Google Cloud Project ID: foo-bar

🔑 Please ensure you are authenticated with Google Cloud:
  - Run `gcloud auth application-default login` OR ensure `GOOGLE_APPLICATION_CREDENTIALS` environment variable points to a valid service account key.
  - The account needs "Cloud Trace Agent", "Monitoring Metric Writer", and "Logs Writer" roles.
 otelcol-contrib already exists at /Users/jerop/github/gemini-cli/.gemini/otel/bin/otelcol-contrib
🧹 Cleaning up old processes and logs...
 Deleted old GCP collector log.
📄 Wrote OTEL collector config to /Users/jerop/github/gemini-cli/.gemini/otel/collector-gcp.yaml
🚀 Starting OTEL collector for GCP... Logs: /Users/jerop/github/gemini-cli/.gemini/otel/collector-gcp.log
 Waiting for OTEL collector to start (PID: 17013)...
 OTEL collector started successfully on port 4317.

 Local OTEL collector for GCP is running.

🚀 To send telemetry, run the Gemini CLI in a separate terminal window.

📄 Collector logs are being written to: /Users/jerop/github/gemini-cli/.gemini/otel/collector-gcp.log

📊 View your telemetry data in Google Cloud Console:
   - Logs: https://console.cloud.google.com/logs/query;query=logName%3D%22projects%2Ffoo-bar%2Flogs%2Fgemini_cli%22?project=foo-bar
   - Metrics: https://console.cloud.google.com/monitoring/metrics-explorer?project=foo-bar
   - Traces: https://console.cloud.google.com/traces/list?project=foo-bar

Press Ctrl+C to exit.
^C
👋 Shutting down...
⚙️  Disabled telemetry in workspace settings.
🔧 Cleared telemetry OTLP endpoint.
🎯 Cleared telemetry target.
 Workspace settings updated.
🛑 Stopping otelcol-contrib (PID: 17013)...
 otelcol-contrib stopped.
```
2025-06-15 00:47:32 -04:00
Anas H. Sulaiman 34e0d9c0b6 cleanup unused allowBuildArtifacts (#1010) 2025-06-13 12:00:38 -04:00