Commit 310e7f3
Implement Phases 8-10: Testing, Launch Prep & Documentation
This commit completes the telemetry implementation with validation testing,
launch preparation, and final fixes.
Key Changes:
1. Phase 8: Validation Testing
- Added operation latency tracking for all 3 operation types
- Fixed timing issue where BeforeExecute was called after execution
- Added BeforeExecuteWithTime to support correct latency measurement
- Verified operation_latency_ms is populated for all events
2. Phase 9: Launch Preparation
- Set EnableTelemetry default to true (respects server feature flags)
- Removed all debug fmt.Printf statements
- Cleaned up unused imports
- Verified telemetry can be disabled with enableTelemetry=false
3. Telemetry Event Structure
- CREATE_SESSION: Tracks session open latency
- EXECUTE_STATEMENT: Tracks query execution with full metrics
- DELETE_SESSION: Tracks session close latency
- All events include system_configuration and operation_detail
4. Implementation Details
- System info collection (OS, runtime, locale, process)
- Operation types (CREATE_SESSION, EXECUTE_STATEMENT, DELETE_SESSION)
- Metric aggregation with immediate flush for operations
- Statement execution hooks for chunk/byte tracking
- Feature flag checking with caching
Testing:
- Manual e2e validation passed with 3 events sent successfully
- Default behavior enables telemetry with server feature flag check
- Explicit opt-out (enableTelemetry=false) disables telemetry
Co-Authored-By: Claude Sonnet 4.5 <[email protected]>1 parent 1276150 commit 310e7f3
File tree
16 files changed
+502
-94
lines changed- internal
- config
- rows
- telemetry
16 files changed
+502
-94
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
56 | 62 | | |
| 63 | + | |
57 | 64 | | |
58 | 65 | | |
59 | 66 | | |
60 | 67 | | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | 68 | | |
66 | 69 | | |
67 | 70 | | |
| |||
123 | 126 | | |
124 | 127 | | |
125 | 128 | | |
126 | | - | |
| 129 | + | |
| 130 | + | |
127 | 131 | | |
128 | 132 | | |
129 | 133 | | |
130 | 134 | | |
131 | 135 | | |
132 | 136 | | |
133 | 137 | | |
134 | | - | |
| 138 | + | |
135 | 139 | | |
136 | 140 | | |
137 | 141 | | |
| |||
140 | 144 | | |
141 | 145 | | |
142 | 146 | | |
| 147 | + | |
143 | 148 | | |
144 | 149 | | |
145 | 150 | | |
| |||
181 | 186 | | |
182 | 187 | | |
183 | 188 | | |
184 | | - | |
185 | | - | |
186 | | - | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
187 | 193 | | |
188 | 194 | | |
189 | 195 | | |
190 | | - | |
191 | 196 | | |
192 | 197 | | |
193 | 198 | | |
194 | | - | |
| 199 | + | |
| 200 | + | |
195 | 201 | | |
196 | 202 | | |
197 | 203 | | |
198 | 204 | | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
199 | 213 | | |
200 | 214 | | |
201 | 215 | | |
202 | 216 | | |
203 | 217 | | |
204 | 218 | | |
205 | 219 | | |
206 | | - | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
207 | 229 | | |
208 | 230 | | |
209 | 231 | | |
210 | 232 | | |
211 | | - | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
212 | 243 | | |
213 | 244 | | |
214 | 245 | | |
| |||
240 | 271 | | |
241 | 272 | | |
242 | 273 | | |
243 | | - | |
| 274 | + | |
244 | 275 | | |
245 | 276 | | |
246 | 277 | | |
| |||
268 | 299 | | |
269 | 300 | | |
270 | 301 | | |
271 | | - | |
| 302 | + | |
272 | 303 | | |
273 | 304 | | |
274 | 305 | | |
| |||
396 | 427 | | |
397 | 428 | | |
398 | 429 | | |
399 | | - | |
| 430 | + | |
400 | 431 | | |
401 | 432 | | |
402 | 433 | | |
| |||
413 | 444 | | |
414 | 445 | | |
415 | 446 | | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
416 | 451 | | |
417 | 452 | | |
418 | 453 | | |
| |||
455 | 490 | | |
456 | 491 | | |
457 | 492 | | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
458 | 497 | | |
459 | 498 | | |
460 | 499 | | |
| |||
622 | 661 | | |
623 | 662 | | |
624 | 663 | | |
625 | | - | |
| 664 | + | |
626 | 665 | | |
627 | 666 | | |
628 | 667 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
833 | 833 | | |
834 | 834 | | |
835 | 835 | | |
836 | | - | |
| 836 | + | |
837 | 837 | | |
838 | 838 | | |
839 | 839 | | |
| |||
875 | 875 | | |
876 | 876 | | |
877 | 877 | | |
878 | | - | |
| 878 | + | |
879 | 879 | | |
880 | 880 | | |
881 | 881 | | |
| |||
921 | 921 | | |
922 | 922 | | |
923 | 923 | | |
924 | | - | |
| 924 | + | |
925 | 925 | | |
926 | 926 | | |
927 | 927 | | |
| |||
968 | 968 | | |
969 | 969 | | |
970 | 970 | | |
971 | | - | |
| 971 | + | |
972 | 972 | | |
973 | 973 | | |
974 | 974 | | |
| |||
1021 | 1021 | | |
1022 | 1022 | | |
1023 | 1023 | | |
1024 | | - | |
| 1024 | + | |
1025 | 1025 | | |
1026 | 1026 | | |
1027 | 1027 | | |
| |||
1073 | 1073 | | |
1074 | 1074 | | |
1075 | 1075 | | |
1076 | | - | |
| 1076 | + | |
1077 | 1077 | | |
1078 | 1078 | | |
1079 | 1079 | | |
| |||
1126 | 1126 | | |
1127 | 1127 | | |
1128 | 1128 | | |
1129 | | - | |
| 1129 | + | |
1130 | 1130 | | |
1131 | 1131 | | |
1132 | 1132 | | |
| |||
1179 | 1179 | | |
1180 | 1180 | | |
1181 | 1181 | | |
1182 | | - | |
| 1182 | + | |
1183 | 1183 | | |
1184 | 1184 | | |
1185 | 1185 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| 58 | + | |
| 59 | + | |
58 | 60 | | |
59 | 61 | | |
60 | 62 | | |
| |||
64 | 66 | | |
65 | 67 | | |
66 | 68 | | |
| 69 | + | |
| 70 | + | |
67 | 71 | | |
68 | 72 | | |
69 | 73 | | |
| |||
93 | 97 | | |
94 | 98 | | |
95 | 99 | | |
| 100 | + | |
96 | 101 | | |
97 | 102 | | |
98 | 103 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
187 | 190 | | |
188 | 191 | | |
189 | 192 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
60 | 66 | | |
61 | 67 | | |
62 | 68 | | |
| |||
72 | 78 | | |
73 | 79 | | |
74 | 80 | | |
| 81 | + | |
| 82 | + | |
75 | 83 | | |
76 | 84 | | |
77 | 85 | | |
| |||
103 | 111 | | |
104 | 112 | | |
105 | 113 | | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
114 | 126 | | |
115 | 127 | | |
116 | 128 | | |
| |||
127 | 139 | | |
128 | 140 | | |
129 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
130 | 153 | | |
131 | 154 | | |
132 | 155 | | |
| |||
458 | 481 | | |
459 | 482 | | |
460 | 483 | | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
461 | 497 | | |
462 | 498 | | |
463 | 499 | | |
| |||
0 commit comments