Skip to content

Commit 0389a9a

Browse files
authored
SNOW-1342971 Add golang version to telemetry and auth request (#1118)
1 parent fd31f5f commit 0389a9a

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

auth.go

+3
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,9 @@ type authRequestClientEnvironment struct {
147147
Os string `json:"OS"`
148148
OsVersion string `json:"OS_VERSION"`
149149
OCSPMode string `json:"OCSP_MODE"`
150+
GoVersion string `json:"GO_VERSION"`
150151
}
152+
151153
type authRequestData struct {
152154
ClientAppID string `json:"CLIENT_APP_ID"`
153155
ClientAppVersion string `json:"CLIENT_APP_VERSION"`
@@ -315,6 +317,7 @@ func authenticate(
315317
Os: operatingSystem,
316318
OsVersion: platform,
317319
OCSPMode: sc.cfg.ocspMode(),
320+
GoVersion: runtime.Version(),
318321
}
319322

320323
sessionParameters := make(map[string]interface{})

connection_util.go

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"fmt"
99
"io"
1010
"os"
11+
"runtime"
1112
"strconv"
1213
"strings"
1314
"time"
@@ -65,6 +66,7 @@ func (sc *snowflakeConn) connectionTelemetry(cfg *Config) {
6566
sourceKey: telemetrySource,
6667
driverTypeKey: "Go",
6768
driverVersionKey: SnowflakeGoDriverVersion,
69+
golangVersionKey: runtime.Version(),
6870
},
6971
Timestamp: time.Now().UnixNano() / int64(time.Millisecond),
7072
}

telemetry.go

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ const (
2323
queryIDKey = "QueryID"
2424
driverTypeKey = "DriverType"
2525
driverVersionKey = "DriverVersion"
26+
golangVersionKey = "GolangVersion"
2627
sqlStateKey = "SQLState"
2728
reasonKey = "reason"
2829
errorNumberKey = "ErrorNumber"

0 commit comments

Comments
 (0)