@@ -60,9 +60,24 @@ interface DatabricksTelemetryLog {
6060 char_set_encoding ?: string ;
6161 process_name ?: string ;
6262 } ;
63+ auth_type ?: string ;
64+ driver_connection_params ?: {
65+ host_info ?: { host_url ?: string } ;
66+ http_path ?: string ;
67+ mode ?: string ;
68+ use_proxy ?: boolean ;
69+ enable_arrow ?: boolean ;
70+ enable_direct_results ?: boolean ;
71+ socket_timeout ?: number ;
72+ enable_metric_view_metadata ?: boolean ;
73+ } ;
6374 operation_latency_ms ?: number ;
6475 sql_operation ?: {
6576 execution_result ?: string ;
77+ is_compressed ?: boolean ;
78+ operation_detail ?: {
79+ operation_type ?: string ;
80+ } ;
6681 chunk_details ?: {
6782 total_chunks_present ?: number ;
6883 total_chunks_iterated ?: number ;
@@ -368,6 +383,11 @@ export default class DatabricksTelemetryExporter {
368383 if ( metric . latencyMs !== undefined ) {
369384 log . entry . sql_driver_log . operation_latency_ms = metric . latencyMs ;
370385 }
386+ if ( metric . operationType ) {
387+ log . entry . sql_driver_log . sql_operation = {
388+ operation_detail : { operation_type : metric . operationType } ,
389+ } ;
390+ }
371391 if ( metric . driverConfig && includeCorrelation ) {
372392 // system_configuration is a high-entropy client fingerprint (OS, arch,
373393 // locale, process, runtime). Only ship on the authenticated path.
@@ -384,15 +404,47 @@ export default class DatabricksTelemetryExporter {
384404 char_set_encoding : metric . driverConfig . charSetEncoding ,
385405 process_name : sanitizeProcessName ( metric . driverConfig . processName ) || undefined ,
386406 } ;
407+
408+ // auth_type and host/http-path are workspace-correlated, so they ride
409+ // the same auth-only path as system_configuration.
410+ if ( metric . driverConfig . authType ) {
411+ log . entry . sql_driver_log . auth_type = metric . driverConfig . authType ;
412+ }
413+ log . entry . sql_driver_log . driver_connection_params = {
414+ host_info : { host_url : this . host } ,
415+ http_path : metric . driverConfig . httpPath ,
416+ mode : 'THRIFT' ,
417+ use_proxy : metric . driverConfig . useProxy ,
418+ enable_arrow : metric . driverConfig . arrowEnabled ,
419+ enable_direct_results : metric . driverConfig . directResultsEnabled ,
420+ // The proto `socket_timeout` field is defined in seconds, but the driver
421+ // tracks socketTimeout in milliseconds — convert so the receiver records
422+ // the correct unit (e.g. 900000ms -> 900s) instead of treating ms as seconds.
423+ socket_timeout :
424+ typeof metric . driverConfig . socketTimeout === 'number'
425+ ? Math . round ( metric . driverConfig . socketTimeout / 1000 )
426+ : metric . driverConfig . socketTimeout ,
427+ enable_metric_view_metadata : metric . driverConfig . enableMetricViewMetadata ,
428+ } ;
387429 }
388430 } else if ( metric . metricType === 'statement' ) {
389431 log . entry . sql_driver_log . operation_latency_ms = metric . latencyMs ;
390432
391- if ( metric . resultFormat || metric . chunkCount ) {
433+ if ( metric . resultFormat || metric . chunkCount || metric . operationType || metric . compressed !== undefined ) {
392434 log . entry . sql_driver_log . sql_operation = {
393435 execution_result : metric . resultFormat ,
394436 } ;
395437
438+ if ( metric . compressed !== undefined ) {
439+ log . entry . sql_driver_log . sql_operation . is_compressed = metric . compressed ;
440+ }
441+
442+ if ( metric . operationType ) {
443+ log . entry . sql_driver_log . sql_operation . operation_detail = {
444+ operation_type : metric . operationType ,
445+ } ;
446+ }
447+
396448 if ( ( metric . chunkCount ?? 0 ) > 0 ) {
397449 log . entry . sql_driver_log . sql_operation . chunk_details = {
398450 total_chunks_present : metric . chunkCount ,
0 commit comments