Commit 75b077f
fix: telemetry improvements from deep AppInsights analysis (#587)
Based on 10-day telemetry analysis of altimate-code-os:
Error classification (P0):
- Add 4 new error classes: `file_not_found`, `edit_mismatch`,
`not_configured`, `resource_exhausted`
- Move warehouse/driver keywords from `connection` to `not_configured`
- Reduces "unknown" error classification from 85%+ to ~50%
Session metadata (P0):
- Add `os`, `arch`, `node_version` to `session_start` event
- Enables environment-based segmentation in dashboards
Doom loop detection (P1):
- Add per-tool call counter (threshold=30) to catch varied-input loops
- Emits `doom_loop_detected` telemetry event when triggered
- Addresses todowrite tool called 2,080x by one user
Token visibility (P1):
- Add `tokens_input_total` field to generation events
- Includes cached tokens for Anthropic (where `tokens_input` excludes cache)
- Only emitted when it differs from `tokens_input`
Telemetry query docs (P2):
- Add KQL reference documenting `customDimensions` vs `customMeasurements`
- Prevents analysts from querying the wrong column
Cleanup:
- Rename `telemetry-moat-signals.test.ts` → `telemetry-signals.test.ts`
- Remove "moat" terminology from test comments
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 8449bec commit 75b077f
File tree
6 files changed
+244
-7
lines changed- packages/opencode
- src
- altimate/telemetry
- session
- test
- altimate
- telemetry
6 files changed
+244
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
12 | 47 | | |
13 | 48 | | |
14 | 49 | | |
15 | 50 | | |
16 | 51 | | |
17 | 52 | | |
| 53 | + | |
18 | 54 | | |
19 | 55 | | |
20 | 56 | | |
| |||
23 | 59 | | |
24 | 60 | | |
25 | 61 | | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
26 | 65 | | |
| 66 | + | |
27 | 67 | | |
28 | 68 | | |
29 | 69 | | |
| |||
48 | 88 | | |
49 | 89 | | |
50 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
51 | 94 | | |
52 | 95 | | |
53 | 96 | | |
| |||
432 | 475 | | |
433 | 476 | | |
434 | 477 | | |
435 | | - | |
| 478 | + | |
436 | 479 | | |
437 | 480 | | |
438 | 481 | | |
| |||
678 | 721 | | |
679 | 722 | | |
680 | 723 | | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
681 | 731 | | |
682 | 732 | | |
683 | | - | |
684 | 733 | | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
685 | 759 | | |
686 | 760 | | |
| 761 | + | |
687 | 762 | | |
688 | 763 | | |
689 | 764 | | |
| |||
700 | 775 | | |
701 | 776 | | |
702 | 777 | | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
703 | 791 | | |
704 | 792 | | |
705 | 793 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
838 | 838 | | |
839 | 839 | | |
840 | 840 | | |
| 841 | + | |
| 842 | + | |
| 843 | + | |
841 | 844 | | |
842 | 845 | | |
843 | 846 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
25 | 30 | | |
26 | 31 | | |
27 | 32 | | |
| |||
34 | 39 | | |
35 | 40 | | |
36 | 41 | | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
37 | 45 | | |
38 | 46 | | |
39 | 47 | | |
| |||
181 | 189 | | |
182 | 190 | | |
183 | 191 | | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
184 | 223 | | |
185 | 224 | | |
186 | 225 | | |
| |||
275 | 314 | | |
276 | 315 | | |
277 | 316 | | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
278 | 320 | | |
279 | 321 | | |
280 | 322 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
784 | 784 | | |
785 | 785 | | |
786 | 786 | | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
787 | 790 | | |
788 | 791 | | |
789 | 792 | | |
| |||
Lines changed: 4 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
739 | 739 | | |
740 | 740 | | |
741 | 741 | | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
742 | 745 | | |
743 | 746 | | |
744 | 747 | | |
| |||
0 commit comments