Commit 09cde19
Fix telemetry proto field mapping
Correct issue where Operation.Type values were incorrectly placed in
statement_type field. Per proto definition:
- statement_type expects Statement.Type (QUERY, SQL, UPDATE, METADATA, VOLUME)
- operation_type goes in operation_detail.operation_type and uses Operation.Type
Changes:
- Connection metrics: Set sql_operation.operation_detail.operation_type to
CREATE_SESSION or DELETE_SESSION
- Statement metrics: Set both statement_type (QUERY or METADATA based on
operation) and operation_detail.operation_type (EXECUTE_STATEMENT, etc.)
- Added mapOperationToStatementType() to convert Operation.Type to Statement.Type
This ensures telemetry payloads match the OssSqlDriverTelemetryLog proto
structure correctly.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent adb70bc commit 09cde19
1 file changed
+47
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
255 | 290 | | |
256 | 291 | | |
257 | 292 | | |
| |||
324 | 359 | | |
325 | 360 | | |
326 | 361 | | |
327 | | - | |
| 362 | + | |
328 | 363 | | |
329 | 364 | | |
330 | | - | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
331 | 368 | | |
332 | 369 | | |
333 | 370 | | |
| |||
336 | 373 | | |
337 | 374 | | |
338 | 375 | | |
339 | | - | |
| 376 | + | |
| 377 | + | |
340 | 378 | | |
341 | 379 | | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
342 | 386 | | |
343 | 387 | | |
344 | 388 | | |
| |||
0 commit comments