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

proposal: implement custom driver for xray instead of xray.DB #169

Merged
merged 41 commits into from
Feb 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
03c1c33
implement xray driver
shogo82148 Jan 11, 2020
aad965e
implement SQLContext
shogo82148 Jan 11, 2020
910bbcd
detect attributes
shogo82148 Jan 11, 2020
9dfb500
set statement to the Preparation
shogo82148 Jan 11, 2020
a49ec69
initialize attr lazy
shogo82148 Jan 11, 2020
8bb1e84
initialize xray driver lazy
shogo82148 Jan 11, 2020
46862ba
Detect database type
shogo82148 Jan 11, 2020
01c912b
fix tests
shogo82148 Jan 11, 2020
37fb44e
Merge branch 'master' into improve-sql-support
shogo82148 Jan 11, 2020
e1175ef
fix test dsn
shogo82148 Jan 11, 2020
eb10466
fix infinite recursive call
shogo82148 Jan 11, 2020
be57977
Merge branch 'improve-sql-support' of ssh://github.com/shogo82148/aws…
shogo82148 Jan 11, 2020
1f76e07
fix compile error from Go 1.9 to Go 1.12
shogo82148 Jan 12, 2020
ab0edf5
fix module version
shogo82148 Jan 12, 2020
73e8edf
Merge branch 'master' into improve-sql-support
bhautikpip Jan 14, 2020
3acd0e1
implement NamedValueChecker
shogo82148 Jan 16, 2020
c90c8f7
Merge branch 'master' into improve-sql-support
shogo82148 Jan 28, 2020
1cf53f5
bump up DATA-DOG/go-sqlmock v1.4.0
shogo82148 Jan 29, 2020
4943a6e
rewrite tests of SQL
shogo82148 Feb 4, 2020
a88fa61
add build constraint
shogo82148 Feb 4, 2020
50bf2c1
fix golint warning: ST1016: methods on the same type should have the …
shogo82148 Feb 4, 2020
e27aaa1
revert go.mod changes
shogo82148 Feb 4, 2020
96e9797
remove xray.SQL
shogo82148 Feb 4, 2020
7783f2e
add a link to database/sql/convert.go
shogo82148 Feb 4, 2020
5dd8e57
fix typo
shogo82148 Feb 5, 2020
00c2d32
do not capture ResetSession
shogo82148 Feb 6, 2020
b73262d
check error of UnreadByte
shogo82148 Feb 6, 2020
c433a02
handle driver.ErrSkip
shogo82148 Feb 10, 2020
d8ae7a9
logging skipped query
shogo82148 Feb 10, 2020
fb48a58
go-sql-driver/mysql password sanitizing support
shogo82148 Feb 12, 2020
542f072
fix #181
shogo82148 Feb 12, 2020
328f078
improve skip message
shogo82148 Feb 15, 2020
b870b95
Revert "remove xray.SQL"
shogo82148 Feb 19, 2020
a887f4b
rename xray/sql_test.go
shogo82148 Feb 19, 2020
c2a6757
add deprecated message for xray.SQL
shogo82148 Feb 19, 2020
dc85d5a
update the SQL section in the README
shogo82148 Feb 19, 2020
a4a1cb7
Merge branch 'master' into improve-sql-support
shogo82148 Feb 20, 2020
43985f1
improve go-mysql password sanitizing support
shogo82148 Feb 20, 2020
674d19c
fix compile error
shogo82148 Feb 20, 2020
9a3cb3c
add missing import
shogo82148 Feb 20, 2020
df0c309
Merge branch 'master' into improve-sql-support
bhautikpip Feb 21, 2020
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
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,17 @@ dynamo.ListTablesWithContext(ctx, &dynamodb.ListTablesInput{})

**SQL**

Any `db/sql` calls can be traced with X-Ray by replacing the `sql.Open` call with `xray.SQL`. It is recommended to use URLs instead of configuration strings if possible.
Any `database/sql` calls can be traced with X-Ray by replacing the `sql.Open` call with `xray.SQLContext`. It is recommended to use URLs instead of configuration strings if possible.

```go
func main() {
db := xray.SQL("postgres", "postgres://user:password@host:port/db")
row, _ := db.QueryRow("SELECT 1") // Use as normal
db, err := xray.SQLContext("postgres", "postgres://user:password@host:port/db")
row, err := db.QueryRowContext(ctx, "SELECT 1") // Use as normal
}
```

Note that the `xray.SQL` are deprecated and will be remove when the SDK becomes GA.

**Lambda**

```
Expand Down
Loading