Commit 8ce5643
committed
feat(telemetry): add CodeQ telemetry collection system
Add qBraid-specific telemetry module to collect session data for
analysis and model improvement.
Components:
- config: Add qbraid.telemetry config section under a separate namespace
to maintain upstream compatibility when merging from opencode
- types: TypeScript types matching the telemetry service schema
- sanitizer: Strip secrets, redact sensitive files, truncate large content
- signals: Track implicit feedback (retries, errors, abandonment)
- uploader: Batch and upload data with retry logic and offline handling
- consent: Tier-based consent (free=forced opt-in, paid=opt-in)
- collector: Main module that coordinates all components
Design choices for upstream compatibility:
- All telemetry code is in a separate src/telemetry/ directory
- Config uses qbraid.* namespace that upstream will ignore
- No modifications to existing session/processor logic yet
Implements: [CodeQ] Add telemetry config schema
Implements: [CodeQ] Implement TelemetryCollector module
Implements: [CodeQ] Implement content sanitizer
Implements: [CodeQ] Implement batch uploader with retry1 parent bae0732 commit 8ce5643
8 files changed
Lines changed: 1638 additions & 0 deletions
File tree
- packages/opencode/src
- config
- telemetry
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1183 | 1183 | | |
1184 | 1184 | | |
1185 | 1185 | | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
| 1189 | + | |
| 1190 | + | |
| 1191 | + | |
| 1192 | + | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
| 1197 | + | |
| 1198 | + | |
| 1199 | + | |
| 1200 | + | |
| 1201 | + | |
| 1202 | + | |
| 1203 | + | |
| 1204 | + | |
| 1205 | + | |
| 1206 | + | |
| 1207 | + | |
| 1208 | + | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
| 1216 | + | |
| 1217 | + | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
1186 | 1234 | | |
1187 | 1235 | | |
1188 | 1236 | | |
| |||
0 commit comments