Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change mssql driver from denisenkom to microsoft #621

Merged
merged 2 commits into from
Mar 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion v3/integrations/nrmssql/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# v3/integrations/nrmssql [![GoDoc](https://godoc.org/github.com/newrelic/go-agent/v3/integrations/nrmysql?status.svg)](https://godoc.org/github.com/newrelic/go-agent/v3/integrations/nrmysql)

Package `nrmssql` instruments github.com/denisenkom/go-mssqldb.
Package `nrmssql` instruments github.com/microsoft/go-mssqldb.

```go
import "github.com/newrelic/go-agent/v3/integrations/nrmssql"
Expand Down
10 changes: 5 additions & 5 deletions v3/integrations/nrmssql/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ module github.com/newrelic/go-agent/v3/integrations/nrmssql
go 1.17

require (
github.com/denisenkom/go-mssqldb v0.12.2
github.com/microsoft/go-mssqldb v0.19.0
github.com/newrelic/go-agent/v3 v3.16.1
)

require (
github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe // indirect
github.com/golang-sql/sqlexp v0.1.0 // indirect
github.com/golang/protobuf v1.4.3 // indirect
golang.org/x/crypto v0.0.0-20201016220609-9e8e0b390897 // indirect
golang.org/x/net v0.0.0-20210610132358-84b48f89b13b // indirect
golang.org/x/sys v0.0.0-20210423082822-04245dca01da // indirect
golang.org/x/text v0.3.6 // indirect
golang.org/x/crypto v0.0.0-20220622213112-05595931fe9d // indirect
golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4 // indirect
golang.org/x/sys v0.0.0-20220224120231-95c6836cb0e7 // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013 // indirect
google.golang.org/grpc v1.39.0 // indirect
google.golang.org/protobuf v1.25.0 // indirect
Expand Down
14 changes: 8 additions & 6 deletions v3/integrations/nrmssql/nrmssql.go
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
// Copyright 2020 New Relic Corporation. All rights reserved.
// SPDX-License-Identifier: Apache-2.0

//go:build go1.10
// +build go1.10

// Package nrmssql instruments github.com/denisenkom/go-mssqldb.
// Package nrmssql instruments github.com/microsoft/go-mssqldb.
//
// Use this package to instrument your MSSQL calls without having to manually
// create DatastoreSegments. This is done in a two step process:
Expand All @@ -13,7 +14,7 @@
// If your code is using sql.Open like this:
//
// import (
// _ "github.com/denisenkom/go-mssqldb"
// _ "github.com/microsoft/go-mssqldb"
// )
//
// func main() {
Expand Down Expand Up @@ -47,10 +48,11 @@ package nrmssql
import (
"database/sql"
"fmt"
"github.com/denisenkom/go-mssqldb/msdsn"
"github.com/newrelic/go-agent/v3/internal"

"github.com/denisenkom/go-mssqldb"
mssql "github.com/microsoft/go-mssqldb"
"github.com/microsoft/go-mssqldb/msdsn"

"github.com/newrelic/go-agent/v3/internal"
"github.com/newrelic/go-agent/v3/newrelic"
"github.com/newrelic/go-agent/v3/newrelic/sqlparse"
)
Expand All @@ -71,7 +73,7 @@ func init() {
}

func parseDSN(s *newrelic.DatastoreSegment, dsn string) {
cfg, _, err := msdsn.Parse(dsn)
cfg, err := msdsn.Parse(dsn)
if nil != err {
return
}
Expand Down