🎉 v1.5.0 — Full Compatibility with Kiro IDE Old & New Versions
The new kiro-metrics v1.5.0 plugin works seamlessly on both Kiro IDE legacy (v0.12.333) and Kiro IDE new (v1.0.138). Historical data from older versions is fully preserved and searchable.
🎉 v1.5.0 — 全面兼容新旧版本 Kiro IDE
新版 kiro-metrics v1.5.0 插件同时支持 Kiro IDE 旧版 (v0.12.333) 和 新版 (v1.0.138),均能正常工作,旧数据可以正常检索。
English: No need to uninstall the old plugin — simply install v1.5.0 directly over the existing version. All your previous configurations (AWS credentials, S3 path, username, etc.) are preserved automatically. No reconfiguration required!
中文: 老版本插件无需卸载,直接安装新插件 v1.5.0 即可正常使用。所有已有配置(AWS 凭证、S3 路径、用户名等)自动保留,不需要重新配置!
- Download
kiro-metrics-exporter-1.5.0.vsixfrom this repository - In Kiro IDE: Extensions panel →
...menu → "Install from VSIX..." - Select the downloaded
.vsixfile → Done! ✅
A VSCode extension that exports locally reconstructed Kiro IDE usage metrics to AWS S3.
Kiro 1.0 introduced two relevant changes:
- Official enterprise reporting: The legacy
by_user_analyticreport covers CLI and plugin usage, not the Kiro IDE metrics exported by this extension. Newer per-client reports may expose high-levelKIRO_IDEactivity such as conversations, credits, and messages, but they do not provideChat_AICodeLinesand may not be available in every environment. See the official per-user activity documentation. - Local session persistence: The IDE now stores ACP session events in
~/.kiro/sessions/**/messages.jsonl. This extension parses successfulcreate,write,append,replace,fs_write,fs_append, andstr_replacetool calls from those JSONL files to estimateChat_AICodeLines. On upgraded installations it also discovers pre-1.0 execution logs across the historical workspace/storage-key layout underglobalStorage/kiro.kiroagent, without depending on one fixed internal storage key. Overlapping execution IDs prefer Kiro 1.0 data, with a legacy fallback only when the modern record has no code operations.
The local calculation is a compatibility estimate, not a replacement for Kiro's official telemetry. In particular, local session files do not provide authoritative credit, overage, inline-completion, or acceptance metrics. A replace_all call is conservatively counted as one replacement because the persisted event does not expose the historical match count.
- Click the 📊 Metrics Exporter icon in the Activity Bar (left sidebar)
- Expand Step 1: AWS Credentials
- Configure:
- Access Key: Your AWS Access Key ID
- Secret Key: Your AWS Secret Access Key
- Identity Store ID: Your AWS Identity Store ID (e.g.,
d-1234567890) - Identity Store Region: Region for Identity Store (default:
us-east-1)
- Expand Step 2: User Identity
- Click Username and enter your username
- Click 🔄 Resolve User ID & Display Name
- User ID and Display Name will be auto-populated
- Expand Step 3: S3 Configuration
- Configure:
- S3 Prefix: Full S3 path (e.g.,
s3://bucket/prefix/AWSLogs/accountId/KiroLogs/by_user_analytic/Region/) - S3 Region: Region for S3 operations (default:
us-east-1)
- S3 Prefix: Full S3 path (e.g.,
- Click 🔍 Check S3 Write Permission to verify access
- 📄 Open Log File: View today's operation log
- 📂 Open Log Folder: Open logs directory
- ⚙️ Open Settings: Quick access to extension settings
Use the buttons in the panel header:
| Button | Description |
|---|---|
| ⏱️ Upload Last 7 Days | Export metrics for T-7 to T-1 |
| 📤 Upload All Till Yesterday | Export all available data up to T-1 |
| Column | Description |
|---|---|
| UserId | AWS Identity Center User ID |
| Date | Date in MM-DD-YYYY format |
| Chat_AICodeLines | Net lines of AI-generated code |
| Chat_MessagesSent | Number of executions |
| Other columns | Set to 0 for compatibility |
{s3Prefix}/{year}/{month}/{day}/00/kiro-ide-{userId}.csv
Example:
s3://bucket/prefix/AWSLogs/123456789012/KiroLogs/by_user_analytic/us-east-1/2025/01/04/00/kiro-ide-abc123.csv
Note: Uploads are idempotent - same path for same date/user combination.
Logs are saved to: ~/.kiro-metrics-exporter/logs/metrics-exporter-YYYY-MM-DD.log
Log contents include:
- Operation start/end timestamps
- User and S3 configuration
- Scan progress and results
- Upload progress (N/M files)
- Timing statistics
Example log:
[2025-01-04T10:30:00.000Z] [INFO] [Upload Last 7 Days] ========== Operation Started ==========
[2025-01-04T10:30:00.001Z] [INFO] [Upload Last 7 Days] User: john.doe, UserId: xxx-xxx
[2025-01-04T10:30:01.000Z] [INFO] [Upload Last 7 Days] [Scanning] Completed in 1.00s - Found 50 records
[2025-01-04T10:30:02.000Z] [INFO] [Upload Last 7 Days] [Upload] 1/7 - 2025-01-03 -> s3://bucket/path/file.csv
| Service | Permission | Purpose |
|---|---|---|
| S3 | PutObject |
Upload CSV files |
| S3 | DeleteObject |
Clean up test files (permission check) |
| Identity Store | GetUserId |
Resolve username to User ID |
| Identity Store | DescribeUser |
Get Display Name |
| Kiro version | Platform | Path |
|---|---|---|
| 1.0+ | All | ~/.kiro/sessions |
| Legacy source | Windows | %APPDATA%\Kiro\User\globalStorage\kiro.kiroagent |
| Legacy source | macOS | ~/Library/Application Support/Kiro/User/globalStorage/kiro.kiroagent |
| Legacy source | Linux | ~/.config/Kiro/User/globalStorage/kiro.kiroagent |
# Install dependencies
npm install
# Compile TypeScript
npm run compile
# Watch for changes
npm run watch- Press
F5to open Extension Development Host - Click the 📊 Metrics Exporter icon in Activity Bar
- Configure AWS settings following the 4 steps
- Test upload functionality
| Issue | Solution |
|---|---|
| User resolution fails | Check Identity Store ID and credentials |
| S3 permission denied | Verify IAM policy has PutObject permission |
| No data found | On Kiro 1.0+, verify ~/.kiro/sessions contains session folders with messages.jsonl; older versions use the legacy globalStorage path |
| Upload fails | Check S3 prefix format (must start with s3://) |
| Stats drop to zero after May 2026 | Use a build with Kiro 1.0 ACP JSONL support; older releases only understand legacy globalStorage logs |
- Click 📄 Open Log File in Step 4
- Or navigate to
~/.kiro-metrics-exporter/logs/
See CHANGELOG.md for version history.