Skip to content

Commit

Permalink
SNOW-502094 Add Source to Telemetry (#494)
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-jbahk authored Nov 15, 2021
1 parent 8ca3bb1 commit a6d174e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions connection_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ func (sc *snowflakeConn) connectionTelemetry(cfg *Config) {
data := &telemetryData{
Message: map[string]string{
typeKey: connectionParameters,
sourceKey: telemetrySource,
driverTypeKey: "Go",
driverVersionKey: SnowflakeGoDriverVersion,
},
Expand Down
1 change: 1 addition & 0 deletions errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ func (se *SnowflakeError) generateTelemetryExceptionData() *telemetryData {
data := &telemetryData{
Message: map[string]string{
typeKey: sqlException,
sourceKey: telemetrySource,
driverTypeKey: "Go",
driverVersionKey: SnowflakeGoDriverVersion,
stacktraceKey: maskSecrets(string(debug.Stack())),
Expand Down
2 changes: 2 additions & 0 deletions telemetry.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const (

const (
typeKey = "type"
sourceKey = "source"
queryIDKey = "QueryID"
driverTypeKey = "DriverType"
driverVersionKey = "DriverVersion"
Expand All @@ -30,6 +31,7 @@ const (
)

const (
telemetrySource = "golang_driver"
sqlException = "client_sql_exception"
connectionParameters = "client_connection_parameters"
)
Expand Down

0 comments on commit a6d174e

Please sign in to comment.